From 71b09dcf874fc1f994c911b159c8b779d7e4ad6c Mon Sep 17 00:00:00 2001 From: jcleng Date: Fri, 25 Aug 2023 10:04:33 -0600 Subject: [PATCH 1/4] Create /etc/static/shells before than /etc/shells Create /etc/static/shells before than /etc/shells, because /etc/shells ls linkd etc/static/shells. when use nixos is default has't /etc/static/shells --- code.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code.sh b/code.sh index de8d0ec..f6df6fc 100755 --- a/code.sh +++ b/code.sh @@ -60,6 +60,13 @@ for i in "${SDK[@]}"; do fi done +# Create /etc/static/shells before than /etc/shells, because /etc/shells ls linkd etc/static/shells +# when use nixos is default has't /etc/static/shells +if [ ! -f /etc/static/shells ]; then + mkdir -p /etc/static/ + printf '/usr/bin/%s\n' sh bash > /etc/static/shells +fi + if [ ! -e /etc/shells ] && [ -e /var/run/host/etc/shells ]; then ln -s /var/run/host/etc/shells /etc/shells fi From 8b3b591817508d6a4ec9c1153f4df05c9ebb2e44 Mon Sep 17 00:00:00 2001 From: jcleng Date: Thu, 7 Dec 2023 20:42:57 +0800 Subject: [PATCH 2/4] Update code.sh --- code.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/code.sh b/code.sh index f6df6fc..e5a4042 100755 --- a/code.sh +++ b/code.sh @@ -60,17 +60,14 @@ for i in "${SDK[@]}"; do fi done -# Create /etc/static/shells before than /etc/shells, because /etc/shells ls linkd etc/static/shells -# when use nixos is default has't /etc/static/shells -if [ ! -f /etc/static/shells ]; then - mkdir -p /etc/static/ - printf '/usr/bin/%s\n' sh bash > /etc/static/shells -fi - if [ ! -e /etc/shells ] && [ -e /var/run/host/etc/shells ]; then ln -s /var/run/host/etc/shells /etc/shells fi +if [ ! -e /etc/static/shells ] && [ -e /var/run/host/etc/static/shells ]; then + ln -s /var/run/host/etc/static/shells /etc/static/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 \ From 28e709a494dfc061eebf2abd8472c4f8dae22e29 Mon Sep 17 00:00:00 2001 From: jcleng Date: Fri, 8 Dec 2023 17:50:25 +0800 Subject: [PATCH 3/4] Update code.sh --- code.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/code.sh b/code.sh index e5a4042..32471df 100755 --- a/code.sh +++ b/code.sh @@ -65,6 +65,7 @@ if [ ! -e /etc/shells ] && [ -e /var/run/host/etc/shells ]; then fi if [ ! -e /etc/static/shells ] && [ -e /var/run/host/etc/static/shells ]; then + mkdir -p /etc/static/ ln -s /var/run/host/etc/static/shells /etc/static/shells fi From a3d5430899e1f70778fd62dad139642cf3e1c426 Mon Sep 17 00:00:00 2001 From: jcleng Date: Fri, 8 Dec 2023 18:24:38 +0800 Subject: [PATCH 4/4] Update code.sh --- code.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code.sh b/code.sh index 32471df..f6df6fc 100755 --- a/code.sh +++ b/code.sh @@ -60,13 +60,15 @@ 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 +# Create /etc/static/shells before than /etc/shells, because /etc/shells ls linkd etc/static/shells +# when use nixos is default has't /etc/static/shells +if [ ! -f /etc/static/shells ]; then + mkdir -p /etc/static/ + printf '/usr/bin/%s\n' sh bash > /etc/static/shells fi -if [ ! -e /etc/static/shells ] && [ -e /var/run/host/etc/static/shells ]; then - mkdir -p /etc/static/ - ln -s /var/run/host/etc/static/shells /etc/static/shells +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" \