Skip to content

Commit

Permalink
Check .nonadmin to set shortcut path
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclary committed Jul 14, 2023
1 parent d515de3 commit 4b2fcb3
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/installers-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,17 @@ jobs:
installer -pkg $PKG_PATH -target CurrentUserHomeDirectory >/dev/null
root_prefix=$(compgen -G $HOME/Library/spyder-*)
echo "Install info:"
echo "Contents of" $HOME/Library/spyder-* :
ls -al $HOME/Library/spyder-*
echo -e "\nContents of" $HOME/Library/spyder-*/uninstall-spyder.sh :
cat $HOME/Library/spyder-*/uninstall-spyder.sh
echo "Contents of ${root_prefix}:"
ls -al $root_prefix
echo -e "\nContents of ${root_prefix}/uninstall-spyder.sh:"
cat $root_prefix/uninstall-spyder.sh
app_path=/Applications/Spyder.app
[[ -e ${root_prefix}/.nonadmin ]] && app_path=${HOME}${app_path}
app_path=$HOME/Applications/Spyder.app
if [[ -e "$app_path" ]]; then
echo "Contents of $app_path/Contents/MacOS:"
ls -al $app_path/Contents/MacOS
Expand All @@ -278,20 +282,20 @@ jobs:
run: |
$PKG_PATH -b
root_prefix=$(compgen -G $HOME/.local/spyder-*)
echo "Install info:"
echo "Contents of" $HOME/.local/spyder-* :
ls -al $HOME/.local/spyder-*
echo -e "\nContents of" $HOME/.local/spyder-*/uninstall-spyder.sh :
cat $HOME/.local/spyder-*/uninstall-spyder.sh
echo "Contents of ${root_prefix}:"
ls -al $root_prefix
echo -e "\nContents of ${root_prefix}/uninstall-spyder.sh:"
cat ${root_prefix}/uninstall-spyder.sh
shortcut_path=/.local/share/applications/spyder_spyder.desktop
[[ -e ${root_prefix}/.nonadmin ]] && shortcut_path=${HOME}${shortcut_path} || shortcut_path=/usr${shortcut_path}
shortcut_path=$HOME/.local/share/applications/spyder_spyder.desktop
if [[ -e $shortcut_path ]]; then
echo "Contents of" $HOME/.local/spyder-* :
ls -al $HOME/.local/spyder-*
echo -e "\nContents of ${shortcut_path}:"
cat $shortcut_path
echo -e "\nContents of" $HOME/.local/spyder-*/uninstall-spyder.sh :
cat $HOME/.local/spyder-*/uninstall-spyder.sh
else
echo "$shortcut_path does not exist"
exit 1
Expand Down

0 comments on commit 4b2fcb3

Please sign in to comment.