mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 13:15:09 -07:00
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]
This commit is contained in:
parent
1ff7b83d3c
commit
cb76a8a95f
@ -62,8 +62,17 @@ delete_blacklisted
|
|||||||
# AppDir complete. Now package it as an AppImage.
|
# AppDir complete. Now package it as an AppImage.
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
# No need for a fancy script. AppRun can just be a symlink to nvim.
|
# Appimage set the ARGV0 environment variable. This causes problems in zsh.
|
||||||
ln -s usr/bin/nvim AppRun
|
# 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.
|
cd "$APP_BUILD_DIR" # Get out of AppImage directory.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user