Skip to content

Commit

Permalink
Create /etc/shells if it is missing
Browse files Browse the repository at this point in the history
Resolves: #288

The shell discovery process in vscode crashes if `/etc/shells` does not exist, resulting in no shells being available (including any custom profiles). This will link `/var/run/host/etc/shells` to `/etc/shells` if the latter is missing.
  • Loading branch information
jcdickinson authored and barthalion committed May 6, 2022
1 parent 7c97ff0 commit cbff22c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ for i in "${SDK[@]}"; do
fi
done

if [ ! -e /etc/shells ] && [ -e /var/run/host/etc/shells ]; then
ln -s /var/run/host/etc/shells /etc/shells
fi

exec env ELECTRON_RUN_AS_NODE=1 PATH="${PATH}:${XDG_DATA_HOME}/node_modules/bin" \
/app/bin/zypak-wrapper.sh /app/extra/vscode/code /app/extra/vscode/resources/app/out/cli.js \
--ms-enable-electron-run-as-node --extensions-dir=${XDG_DATA_HOME}/vscode/extensions \
Expand Down

0 comments on commit cbff22c

Please sign in to comment.