From 99843f320185d5ee58400aeb8759cdeb3f7c14b2 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Thu, 24 Jan 2019 14:18:47 +0800 Subject: [PATCH] Fix edo in bootstrap-haskell This seems to have caused occasional weird side-effects on the following line: edo curl https://raw.githubusercontent.com/haskell/ghcup/master/ghcup > "${HOME}"/.ghcup/bin/ghcup ... edo ghcup install It would result in: ~/.ghcup/bin/ghcup: line 1: $'\E[0': command not found ~/.ghcup/bin/ghcup: line 1: 35mcurl: command not found which seems to be because of printf and the piping command. It's not entirely clear to me what happens here, but it seems part of the printf output to stdout where mixed with the next command. --- bootstrap-haskell | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap-haskell b/bootstrap-haskell index 5940056..5106804 100755 --- a/bootstrap-haskell +++ b/bootstrap-haskell @@ -10,7 +10,7 @@ die() { edo() { - printf "\\033[0;35m%s\\033[0m\\n" "$*" + (>&2 printf "\\033[0;35m%s\\033[0m\\n" "$*") "$@" || exit 2 }