From cbff22c47173af3dd6213fecb95f5602aa1bdeed Mon Sep 17 00:00:00 2001 From: Jonathan Dickinson Date: Mon, 2 May 2022 16:43:34 -0400 Subject: [PATCH] Create `/etc/shells` if it is missing 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. --- code.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code.sh b/code.sh index 628a202..de8d0ec 100755 --- a/code.sh +++ b/code.sh @@ -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 \