Skip to content

Commit

Permalink
ensure leading newline when adding lines to shell profile (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
dy-dx authored Apr 1, 2024
1 parent 46edc10 commit a50e7eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ case $SHELL in
esac

if [ ! $DVM_DIR ];then
command echo "export DVM_DIR=\"$dvm_dir\"" >> "$HOME/$shell_profile"
command echo "export PATH=\"\$DVM_DIR/bin:\$PATH\"" >> "$HOME/$shell_profile"
EXPORT_DVM_DIR="export DVM_DIR=\"$dvm_dir\""
EXPORT_PATH="export PATH=\"\$DVM_DIR/bin:\$PATH\""
command printf "\\n$EXPORT_DVM_DIR\\n$EXPORT_PATH\\n" >> "$HOME/$shell_profile"
fi

echo "Dvm was installed successfully to $exe"
Expand Down

0 comments on commit a50e7eb

Please sign in to comment.