Description
Current Behavior (bug)
Since updating to 0.8.6 this morning, I'm now getting:
/Users/jason/workspace/local-ops/.devbox/gen/scripts/.hooks.sh:15: syntax error: unexpected end of file
I'm using Fish as my shell.
This is consistent across all my projects, and has been replicated by my co-worker @jay-aye-see-kay's mac also, though he had to delete his .devbox
directory in the project to start seeing the error.
This prevents any commands from starting, for example:
> devbox run setup
/Users/jason/workspace/cultureamp/std-demographics-next/.devbox/gen/scripts/.hooks.sh: line 15: syntax error: unexpected end of file
Error: error running script "setup" in Devbox: exit status 2
Expected Behavior (fix)
There shouldn't be a syntax error when running devbox commands on a fish shell.
Notably, @jay-aye-see-kay pointed out the file is a .sh
file with no shebang, but contains fish syntax.
If I run ./devbox/gen/scripts/.hooks.sh
I get the error, but if I source it with . ./devbox/gen/scripts/.hooks.sh
it works as expected.
Additional context
Please include the output of devbox version -v
Version: 0.8.6
Platform: darwin_amd64
Commit: af58be9b50c1a3d19bc21485bcbb77eb8ed8076a
Commit Time: 2024-01-18T18:36:03Z
Go Version: go1.21.5
Launcher: 0.2.1
A copy of your devbox.json
file:
{
"packages": ["flake:nixpkgs#nodejs_18", "flake:nixpkgs#nodejs_18.pkgs.pnpm"],
"env": {
"STD_DEMOGRAPHICS_PORT": "4267"
},
"shell": {
"scripts": {
"setup": "pnpm install"
}
}
}
Fish version: 3.6.1