diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2021-05-02 14:35:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-02 14:35:21 -0400 |
commit | 7516acfadda5db8849b0e06953b7636428ee2ccd (patch) | |
tree | 0b873057d85c0732dc9e1ee4c0d0933b3e95177a /src/SMAPI.Installer | |
parent | f067b33ee4755cb7e6bc904f5c847360fec00c91 (diff) | |
parent | ec9914efad9e4ba46d49337b473b79bcdfd20d1f (diff) | |
download | SMAPI-7516acfadda5db8849b0e06953b7636428ee2ccd.tar.gz SMAPI-7516acfadda5db8849b0e06953b7636428ee2ccd.tar.bz2 SMAPI-7516acfadda5db8849b0e06953b7636428ee2ccd.zip |
Merge pull request #776 from kuesji/patch-1
Fix strict Linux sandbox support in launcher
Diffstat (limited to 'src/SMAPI.Installer')
-rw-r--r-- | src/SMAPI.Installer/assets/unix-launcher.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/SMAPI.Installer/assets/unix-launcher.sh b/src/SMAPI.Installer/assets/unix-launcher.sh index 93bf58d8..0046e716 100644 --- a/src/SMAPI.Installer/assets/unix-launcher.sh +++ b/src/SMAPI.Installer/assets/unix-launcher.sh @@ -80,8 +80,14 @@ else export LAUNCHTERM="$(basename "$(readlink -f $(COMMAND x-terminal-emulator))")" fi - # run in selected terminal and account for quirks - case $LAUNCHTERM in + + if [ ! -x $LAUNCHTERM ]; then + echo "looks like found no terminal available for launch. maybe in sandbox or misconfigured system? fallbacking to execution without terminal" + export TERM="xterm" + exec $LAUNCHER $@ + else + # run in selected terminal and account for quirks + case $LAUNCHTERM in terminal|termite) # LAUNCHTERM consumes only one argument after -e # options containing space characters are unsupported @@ -110,5 +116,6 @@ else if [ $? -eq 127 ]; then exec $LAUNCHER --no-terminal "$@" fi - esac + esac + fi fi |