diff options
author | erw7 <erw7.github@gmail.com> | 2018-12-19 14:30:58 +0900 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-12-19 06:30:58 +0100 |
commit | cb76a8a95f3a2fc7ac4f7a56720cec62f33160eb (patch) | |
tree | 64dae68231d8f6405456d8dcaebc4a970ca6f5e3 | |
parent | 1ff7b83d3c38dd3c0347728f0619ca1cf90b92d8 (diff) | |
download | rneovim-cb76a8a95f3a2fc7ac4f7a56720cec62f33160eb.tar.gz rneovim-cb76a8a95f3a2fc7ac4f7a56720cec62f33160eb.tar.bz2 rneovim-cb76a8a95f3a2fc7ac4f7a56720cec62f33160eb.zip |
genappimage: Unset $ARGV0 at invocation #9376
AppImage sets $ARGV0 which breaks zsh.
Hack around this in our appimage.
fixes #9341
ref https://github.com/AppImage/AppImageKit/issues/852
[ci skip]
-rwxr-xr-x | scripts/genappimage.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/genappimage.sh b/scripts/genappimage.sh index 2c10ed7202..ed008938f3 100755 --- a/scripts/genappimage.sh +++ b/scripts/genappimage.sh @@ -62,8 +62,17 @@ delete_blacklisted # AppDir complete. Now package it as an AppImage. ######################################################################## -# No need for a fancy script. AppRun can just be a symlink to nvim. -ln -s usr/bin/nvim AppRun +# Appimage set the ARGV0 environment variable. This causes problems in zsh. +# To prevent this, we use wrapper script to unset ARGV0 as AppRun. +# See https://github.com/AppImage/AppImageKit/issues/852 +# +cat << 'EOF' > AppRun +#!/bin/bash + +unset ARGV0 +exec "$(dirname "$(readlink -f "${0}")")/usr/bin/nvim" ${@+"$@"} +EOF +chmod 755 AppRun cd "$APP_BUILD_DIR" # Get out of AppImage directory. |