Closed
Description
Current Behavior (bug)
To reproduce, run these commands:
foo() { echo foo; }
export -f foo
devbox shell
This error appears:
bash: export: `BASH_FUNC_foo%%=() { echo foo}': not a valid identifier
Despite the error, the foo
function is still available in the shell.
Expected Behavior (fix)
The error should not appear.
Additional context
My devbox version -v
:
Version: 0.4.9
Platform: linux_amd64
Commit: b03f0d26da3df4318f2a8d70c0531c0c77d0d33c
Commit Time: 2023-05-02T23:26:52Z
Go Version: go1.20.3
Launcher: 0.2.0
Activity
v3ss0n commentedon Feb 17, 2024
same here any work around?
albx79 commentedon Feb 24, 2024
Apparently, since the exported functions are available inside the devbox environment, the workaround is just to ignore the error.
I'ld still love it for the error not to appear, though, as I wasted quite a bit of time trying to figure out what was wrong with my env.
Akiyamka commentedon Mar 21, 2024
@albx79 , same thing, I spent about a few hours trying to figure out what went wrong
For some reason devbox take working function from my env
and create this
Debug info
Akiyamka commentedon Mar 24, 2024
Look like it broke init_hook, it not running anymore
Akiyamka commentedon Mar 25, 2024
plugins (corepack in my case) fails to execute they hooks too
Akiyamka commentedon Mar 25, 2024
As I understand this code has this form intentionally, but I still can't figure out how to fix the error
https://antonyt.com/blog/2020-03-27/exploiting-cgi-scripts-with-shellshock
staylorx commentedon May 17, 2024
When i run
devbox shell
, I get this,It doesn't seem to impact anything -- as other folks above have said, or is it really harmless? -- but it makes it hard for me to convince my team we should use this together.
Is there a flag or variable I can set in the dotenv.json file to bypass parsing or evaluating .bashrc or .bash_profile functions? Or is that misguided... that's part of devbox's charm I suppose when it all works smoothly?
Akiyamka commentedon Aug 8, 2024
I already mentioned that it breaks running init scripts. In other words, everything that's written in
Not working because of crash
landtuna commentedon Dec 16, 2024
For a Red Hat system, this causes problems because of
which2.sh
, found in/etc/profile.d
. A workaround is to putunset which
above the call toeval "$(devbox global shellenv)"
.[envvars] Fix error when env contains Bash function (jetify-com#2612)