What happened?
eval "$(devbox global shellenv)" causes the error message "bash: 1__bp_interactive_mode: ambiguous redirect" to appear at every new prompt. (And by "new prompt" I don't mean when I open a new instance of Bash, but whenever a command finishes execution!)
This is a fresh installation of Devbox on a system that had Devbox installed previously. I deleted all Devbox and Nix configuration files I am aware of. I followed the uninstallation guide and re-installed both Devbox and Nix to rule out a configuration error as best as I could.
I found that the culprit is the following export generated by devbox global shellenv:
export PROMPT_COMMAND="__bp_precmd_invoke_cmd\
dbus-send --type=method_call --session --dest=io.elementary.terminal /io/elementary/terminal io.elementary.terminal.ProcessFinished string:\$PANTHEON_TERMINAL_ID string:\"\$(fc -nl -1 | cut -c 3-)\" int32:\$__bp_last_ret_value >/dev/null 2>&1\
__bp_interactive_mode";
If I move the __bp_interactive_mode"; to the end of the line above it, it works fine!
Therefore, as a workaround one could write the output of devbox global shellenv to a file, edit it accordingly, and add eval "$(cat workaround_file_name)" to the Bash config.
Steps to reproduce
- Find a system that has the same problem or download error_snip.txt. (Note: the file is shortened to the problematic lines, it's not the entire output of the command.)
- Execute
eval "$(cat error_snip)"
- The output will be: "bash: 1__bp_interactive_mode: ambiguous redirect"
- Open a new shell and try
eval "$(fixed_snip.txt)" instead.
- There will be no output.
Command
global
devbox.json
Devbox version
0.17.1
Nix version
2.34.5
What system does this bug occur on?
Linux (x86-64)
Debug logs
No response
What happened?
eval "$(devbox global shellenv)"causes the error message "bash: 1__bp_interactive_mode: ambiguous redirect" to appear at every new prompt. (And by "new prompt" I don't mean when I open a new instance of Bash, but whenever a command finishes execution!)This is a fresh installation of Devbox on a system that had Devbox installed previously. I deleted all Devbox and Nix configuration files I am aware of. I followed the uninstallation guide and re-installed both Devbox and Nix to rule out a configuration error as best as I could.
I found that the culprit is the following export generated by
devbox global shellenv:If I move the
__bp_interactive_mode";to the end of the line above it, it works fine!Therefore, as a workaround one could write the output of
devbox global shellenvto a file, edit it accordingly, and addeval "$(cat workaround_file_name)"to the Bash config.Steps to reproduce
eval "$(cat error_snip)"eval "$(fixed_snip.txt)"instead.Command
global
devbox.json
{ "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.17.1/.schema/devbox.schema.json", "packages": ["git@latest"], "shell": { "init_hook": [ "echo 'Welcome to devbox!' > /dev/null" ], "scripts": { "test": [ "echo \"Error: no test specified\" && exit 1" ] } } }Devbox version
0.17.1
Nix version
2.34.5
What system does this bug occur on?
Linux (x86-64)
Debug logs
No response