Skip to content

Commit

Permalink
Fix PermissionError
Browse files Browse the repository at this point in the history
- shabang line should be /bin/sh
- Allow user's shell to be determined at runtime instead of install time.
- Set SPYDER_APP to runtime location of app bundle
  • Loading branch information
mrclary committed Sep 24, 2022
1 parent f17d2dc commit 3eea419
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions installers-conda/resources/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ if [[ -e "$app_path" ]]; then

echo "Modifying application executable..."
cat <<EOF > $app_path/Contents/MacOS/__NAME__
#!/bin/bash
eval "\$(/bin/bash -l -c "declare -x")"
#!/bin/sh
eval "\$(\$SHELL -l -c "declare -x")"
eval "\$("$ROOT_PREFIX/_conda.exe" shell.bash activate "$PREFIX")"
export SPYDER_APP=0
\$(dirname \$BASH_SOURCE)/python $PREFIX/bin/spyder "\$@"
HERE=\$(dirname \$BASH_SOURCE)
export SPYDER_APP=\$(cd "\${HERE}../../" && pwd -P)
\$HERE/python \$CONDA_PREFIX/bin/spyder "\$@"
EOF
else
Expand Down

0 comments on commit 3eea419

Please sign in to comment.