Skip to content

Commit 0c21137

Browse files
committed
fix(cli): handle display path when shell config is outside $HOME
1 parent dc19288 commit 0c21137

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/cli/install.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,12 @@ NPMRC_EOF
651651

652652
# Show restart note if PATH was added to shell config
653653
if [ "$PATH_CONFIGURED" = "true" ] && [ -n "$SHELL_CONFIG_UPDATED" ]; then
654-
local display_config="~${SHELL_CONFIG_UPDATED#"$HOME"}"
654+
local display_config
655+
if [ "${SHELL_CONFIG_UPDATED#"$HOME"}" != "$SHELL_CONFIG_UPDATED" ]; then
656+
display_config="~${SHELL_CONFIG_UPDATED#"$HOME"}"
657+
else
658+
display_config="$SHELL_CONFIG_UPDATED"
659+
fi
655660
echo ""
656661
echo " Note: Run \`source $display_config\` or restart your terminal."
657662
fi

0 commit comments

Comments
 (0)