aboutsummaryrefslogtreecommitdiff
path: root/scripts/genappimage.sh
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-12-27 22:49:44 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-12-27 22:49:44 +0100
commitc1015121ec626cab6cb384f544bc0be1a1760c0e (patch)
tree6cc9a5d1899a4486a24c491e07d17a7dd01f9503 /scripts/genappimage.sh
parent4f030ec24e0e148bbb83aedaef7dd629e5fef130 (diff)
parente1876c7ad1b5e30c0a9919e2c4587d11550c8507 (diff)
downloadrneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.tar.gz
rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.tar.bz2
rneovim-c1015121ec626cab6cb384f544bc0be1a1760c0e.zip
Merge 'upstream/master' into pr-win-erw7
Diffstat (limited to 'scripts/genappimage.sh')
-rwxr-xr-xscripts/genappimage.sh13
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.