Skip to content

Commit

Permalink
bugfix: Replace echo with printf so "\n" renders.
Browse files Browse the repository at this point in the history
notes:
  I could have used the -e flag in echo, however other lines
  nearby use printf so I figured it would be smart to stay consistent.

  Also, I see the usage of `command printf`. Not 100% if this is
  necessary. I don't see why printf would be redefined in the shell.
  If we're doing this, then we might as well prefix every call
  to a builtin or binary with `command` _just to be safe_.
  • Loading branch information
ryanmjacobs committed Feb 26, 2019
1 parent e5dc0b1 commit d5aed44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ wasmer_link() {
SOURCE_STR="# Wasmer config\nexport WASMER_DIR=\"\$HOME/.wasmer\"\nexport WASMER_CACHE_DIR=\"\$WASMER_DIR/cache\"\nexport PATH=\"\$HOME/.wasmer/bin:\$PATH\"\n"

# We create the wasmer.sh file
echo "$SOURCE_STR" > "$HOME/.wasmer/wasmer.sh"
printf "$SOURCE_STR" > "$HOME/.wasmer/wasmer.sh"

if [ -z "${WASMER_PROFILE-}" ] ; then
printf "${red}Profile not found. Tried:\n* ${WASMER_PROFILE} (as defined in \$PROFILE)\n* ~/.bashrc\n* ~/.bash_profile\n* ~/.zshrc\n* ~/.profile.\n"
Expand Down

0 comments on commit d5aed44

Please sign in to comment.