Skip to content

Commit cc8fec0

Browse files
committed
Mojo: Update onCreateCommand
1 parent ae3f877 commit cc8fec0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ if [ "$(command -v mojo)" ]; then
5757
if ! grep -q "user's modular bin dir" "$HOME/.bashrc"; then
5858
curl -ssL https://magic.modular.com | grep '^MODULAR_HOME\|^BIN_DIR' \
5959
> /tmp/magicenv
60+
. /tmp/magicenv
61+
mkdir -p "${BIN_DIR}"
6062
sed -i 's/\$HOME/\\$HOME/g' /tmp/magicenv
6163
. /tmp/magicenv
6264
echo -e "\n# Append the user's modular bin dir to PATH\nif [[ \"\$PATH\" != *\"${BIN_DIR}\"* ]] ; then\n PATH=\"\$PATH:${BIN_DIR}\"\nfi" >> "$HOME/.bashrc"
@@ -65,6 +67,8 @@ if [ "$(command -v mojo)" ]; then
6567
if ! grep -q "user's modular bin dir" "$HOME/.zshrc"; then
6668
curl -ssL https://magic.modular.com | grep '^MODULAR_HOME\|^BIN_DIR' \
6769
> /tmp/magicenv
70+
. /tmp/magicenv
71+
mkdir -p "${BIN_DIR}"
6872
sed -i 's/\$HOME/\\$HOME/g' /tmp/magicenv
6973
. /tmp/magicenv
7074
echo -e "\n# Append the user's modular bin dir to PATH\nif [[ \"\$PATH\" != *\"${BIN_DIR}\"* ]] ; then\n PATH=\"\$PATH:${BIN_DIR}\"\nfi" >> "$HOME/.zshrc"

0 commit comments

Comments
 (0)