jetify-com / devbox

Instant, easy, and predictable development environments

Home Page:https://www.jetify.com/devbox/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot use `devbox shell`

HappiePlant opened this issue · comments

What happened?

I just installed Devbox, I did devbox init and then devbox shell which gave an error.

Steps to reproduce

  1. Install Devbox
  2. devbox init
  3. devbox shell

Command

shell

devbox.json

{
  "packages": [],
  "shell": {
    "init_hook": [
      "echo 'Welcome to devbox!' > /dev/null"
    ],
    "scripts": {
      "test": [
        "echo \"Error: no test specified\" && exit 1"
      ]
    }
  }
}

Devbox version

0.9.1

Nix version

nix (Nix) 2.20.3

What system does this bug occur on?

Linux (x86-64)

Debug logs

2024/03/02 14:14:00 findProjectDir: path is
2024/03/02 14:14:00 finding devbox config in dir: /home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course
2024/03/02 14:14:00 findProjectDir: path is
2024/03/02 14:14:00 finding devbox config in dir: /home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course
2024/03/02 14:14:00 findProjectDir: path is
2024/03/02 14:14:00 finding devbox config in dir: /home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course
Ensuring packages are installed.
Reinitialized existing Git repository in /home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course/.devbox/gen/flake/.git/
2024/03/02 14:14:00 current environment PATH is: /home/happieplant/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/home/happieplant/.cargo/bin:/home/happieplant/.local/bin:/home/happieplant/bin:/home/happieplant/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/happieplant/.local/share/JetBrains/Toolbox/scripts
2024/03/02 14:14:00 Running print-dev-env cmd: /nix/var/nix/profiles/default/bin/nix print-dev-env path:/home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course/.devbox/gen/flake --extra-experimental-features ca-derivations --option experimental-features nix-command flakes fetch-closure --json
✓ Computed the Devbox environment.
Error: nix print-dev-env --json "path:/home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course/.devbox/gen/flake": exit status 1

2024/03/02 14:14:00 Command stderr: path '/home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course/path:/home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course/.devbox/gen/flake' does not contain a 'flake.nix', searching up
error: getting status of '/home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course/path:/home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course/.devbox/gen/flake': No such file or directory

2024/03/02 14:14:00
ExecutionID:3f99f996b7d94a4b9ad52ec2ade64317
nix print-dev-env --json "path:/home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course/.devbox/gen/flake": exit status 1
go.jetpack.io/devbox/internal/nix.(*Nix).PrintDevEnv
go.jetpack.io/devbox/internal/nix/nix.go:85
go.jetpack.io/devbox/internal/devbox.(*Devbox).computeEnv
go.jetpack.io/devbox/internal/devbox/devbox.go:831
go.jetpack.io/devbox/internal/devbox.(*Devbox).syncNixProfileFromFlake
go.jetpack.io/devbox/internal/devbox/nixprofile.go:20
go.jetpack.io/devbox/internal/devbox.(*Devbox).recomputeState
go.jetpack.io/devbox/internal/devbox/packages.go:341
go.jetpack.io/devbox/internal/devbox.(*Devbox).ensureStateIsUpToDate
go.jetpack.io/devbox/internal/devbox/packages.go:271
go.jetpack.io/devbox/internal/devbox.(*Devbox).ensureStateIsUpToDateAndComputeEnv
go.jetpack.io/devbox/internal/devbox/devbox.go:988
go.jetpack.io/devbox/internal/devbox.(*Devbox).Shell
go.jetpack.io/devbox/internal/devbox/devbox.go:196
go.jetpack.io/devbox/internal/boxcli.runShellCmd
go.jetpack.io/devbox/internal/boxcli/shell.go:83
go.jetpack.io/devbox/internal/boxcli.shellCmd.func1
go.jetpack.io/devbox/internal/boxcli/shell.go:36
github.com/spf13/cobra.(*Command).execute
github.com/spf13/cobra@v1.8.0/command.go:983
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/cobra@v1.8.0/command.go:1115
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/cobra@v1.8.0/command.go:1039
go.jetpack.io/devbox/internal/boxcli/midcobra.(*midcobraExecutable).Execute
go.jetpack.io/devbox/internal/boxcli/midcobra/midcobra.go:61
go.jetpack.io/devbox/internal/boxcli.Execute
go.jetpack.io/devbox/internal/boxcli/root.go:113
go.jetpack.io/devbox/internal/boxcli.Main
go.jetpack.io/devbox/internal/boxcli/root.go:136
main.main
./main.go:11
runtime.main
runtime/proc.go:267
runtime.goexit
runtime/asm_amd64.s:1650
2024/03/02 14:14:00 findProjectDir: path is
2024/03/02 14:14:00 finding devbox config in dir: /home/happieplant/edu/Leerjaar 1/INFIRFS/angular-course

Turns out the problem was that the directory name has a space in it, should I close this now?