From a2294f2974c28bfa0344cf00a748d412bb1a5c3c Mon Sep 17 00:00:00 2001 From: czhang03 Date: Tue, 22 Oct 2024 21:17:59 -0400 Subject: [PATCH 1/2] add scripts to enable linux brew --- vscode.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vscode.sh b/vscode.sh index 523e0a1..f652928 100755 --- a/vscode.sh +++ b/vscode.sh @@ -73,6 +73,17 @@ for i in "${SDK[@]}"; do fi done +# enable path of linux brew +if [ "$FLATPAK_ENABLE_BREW_SDK" -ne 0 ]; then + msg "setting environment variable for linuxbrew" + if [ -f /home/linuxbrew/.linuxbrew/bin/brew ] ; then + eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) + else + msg "Brew binary not found at /home/linuxbrew/.linuxbrew/bin/brew" + msg "Did you enable file access to /home/linuxbrew/.linuxbrew/?" + fi +fi + # Create /etc/shells and add shells from extensions if [ ! -f /etc/shells ]; then printf '/usr/bin/%s\n' sh bash > /etc/shells From 57171e37cc9c533e668dabf39fcc27f8dcba7e7b Mon Sep 17 00:00:00 2001 From: czhang03 Date: Wed, 30 Oct 2024 10:42:29 +0000 Subject: [PATCH 2/2] another try --- vscode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode.sh b/vscode.sh index f652928..d61672d 100755 --- a/vscode.sh +++ b/vscode.sh @@ -74,7 +74,7 @@ for i in "${SDK[@]}"; do done # enable path of linux brew -if [ "$FLATPAK_ENABLE_BREW_SDK" -ne 0 ]; then +if [[ -n "${FLATPAK_ENABLE_BREW_SDK+x}" && "$FLATPAK_ENABLE_BREW_SDK" -ne 0 ]]; then msg "setting environment variable for linuxbrew" if [ -f /home/linuxbrew/.linuxbrew/bin/brew ] ; then eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)