Skip to content

Commit

Permalink
environment.*: env crashes detected, close #235
Browse files Browse the repository at this point in the history
  • Loading branch information
balupton committed Aug 7, 2024
1 parent 44b0b69 commit dca119a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions sources/environment.elv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

# set the environment variables
eval ($E:DOROTHY'/commands/setup-environment-commands' elvish | slurp)
# @todo: someone experienced with elvish should send a PR to add detection (like fish and bash have) on failures of the above command
5 changes: 4 additions & 1 deletion sources/environment.fish
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env fish

# set the environment variables
eval ("$DOROTHY/commands/setup-environment-commands" fish)
eval ("$DOROTHY/commands/setup-environment-commands" fish || begin
echo "DOROTHY FAILED TO SETUP ENVIRONMENT, RUN THIS TO DEBUG: bash -x '$DOROTHY/commands/setup-environment-commands' fish" >/dev/stderr
return 1
end)
1 change: 1 addition & 0 deletions sources/environment.nu
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ setup-environment-commands 'nu'
| transpose -r
| into record
| load-env
# @todo: someone experienced with nu should send a PR to add detection (like fish and bash have) on failures of the above command
9 changes: 3 additions & 6 deletions sources/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ else
fi

# set the environment variables
{
eval "$("$DOROTHY/commands/setup-environment-commands" "$ACTIVE_POSIX_SHELL")"
} || {
echo "Failed to setup environment, failed command was:"
echo "$DOROTHY/commands/setup-environment-commands" "$ACTIVE_POSIX_SHELL"
eval "$("$DOROTHY/commands/setup-environment-commands" "$ACTIVE_POSIX_SHELL" || {
echo "DOROTHY FAILED TO SETUP ENVIRONMENT, RUN THIS TO DEBUG: bash -x '$DOROTHY/commands/setup-environment-commands' '$ACTIVE_POSIX_SHELL'" >/dev/stderr
return 1
} >/dev/stderr
})"
1 change: 1 addition & 0 deletions sources/environment.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

# set the environment variables
evalx(compilex($(@($DOROTHY + '/commands/setup-environment-commands') xonsh)))
# @todo: someone experienced with xonsh should send a PR to add detection (like fish and bash have) on failures of the above command

0 comments on commit dca119a

Please sign in to comment.