Skip to content

Commit 143bf71

Browse files
committed
MAX/Mojo: Update onCreateCommand
1 parent 5ff19a1 commit 143bf71

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.devcontainer/scripts/usr/local/bin/onCreateCommand.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ fi
5555
if [ "$(command -v mojo)" ]; then
5656
# Append the user's modular bin dir to PATH
5757
if ! grep -q "user's modular bin dir" "$HOME/.bashrc"; then
58+
echo MODULAR_HOME=\"\$HOME/.modular\" > /tmp/magicenv
5859
(curl -ssL https://magic.modular.com || cat /var/tmp/magicenv.bak) \
59-
| grep '^MODULAR_HOME\|^BIN_DIR' | tee /tmp/magicenv > /dev/null
60+
| grep '^BIN_DIR' | tee -a /tmp/magicenv > /dev/null
6061
. /tmp/magicenv
6162
mkdir -p "${BIN_DIR}"
6263
sed -i 's/\$HOME/\\$HOME/g' /tmp/magicenv
@@ -65,8 +66,9 @@ if [ "$(command -v mojo)" ]; then
6566
rm /tmp/magicenv
6667
fi
6768
if ! grep -q "user's modular bin dir" "$HOME/.zshrc"; then
69+
echo MODULAR_HOME=\"\$HOME/.modular\" > /tmp/magicenv
6870
(curl -ssL https://magic.modular.com || cat /var/tmp/magicenv.bak) \
69-
| grep '^MODULAR_HOME\|^BIN_DIR' | tee /tmp/magicenv > /dev/null
71+
| grep '^BIN_DIR' | tee -a /tmp/magicenv > /dev/null
7072
. /tmp/magicenv
7173
mkdir -p "${BIN_DIR}"
7274
sed -i 's/\$HOME/\\$HOME/g' /tmp/magicenv

0 commit comments

Comments
 (0)