Skip to content

Commit

Permalink
refactor: remove unnecessary file descriptor number 1 in redirectio…
Browse files Browse the repository at this point in the history
…ns ➡️
  • Loading branch information
oldratlee committed Feb 18, 2024
1 parent 470ef86 commit 59eca5d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/cp-into-docker-run
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ redPrint() {
}

die() {
redPrint "Error: $*" 1>&2
redPrint "Error: $*" >&2
exit 1
}

Expand Down Expand Up @@ -242,7 +242,7 @@ trap cleanupWhenExit EXIT
########################################

logAndRun() {
$verbose && printf '%s\n' "[$PROG] $*" 1>&2
$verbose && printf '%s\n' "[$PROG] $*" >&2
"$@"
}

Expand Down
2 changes: 1 addition & 1 deletion bin/show-busy-java-threads
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ blueOutput() {
}

die() {
redOutput "Error: $*" 1>&2
redOutput "Error: $*" >&2
exit 1
}

Expand Down
2 changes: 1 addition & 1 deletion bin/uq
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ yellowPrint() {
}

die() {
redPrint "Error: $*" 1>&2
redPrint "Error: $*" >&2
exit 1
}

Expand Down
2 changes: 1 addition & 1 deletion legacy-bin/cp-svn-url
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ readonly dir="${1:-.}"
# NOTE: DO NOT declare var url as readonly in ONE line!
url="$(svn info "${dir}" | awk '/^URL: /{print $2}')"
if [ -z "${url}" ]; then
echo "Fail to get svn url!" 1>&2
echo "Fail to get svn url!" >&2
exit 1
fi

Expand Down
2 changes: 1 addition & 1 deletion test-cases/bump-scripts-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ logAndRun() {
}

die() {
redPrint "Error: $*" 1>&2
redPrint "Error: $*" >&2
exit 1
}

Expand Down
2 changes: 1 addition & 1 deletion test-cases/my_unit_test_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fail() {
}

die() {
redEcho "Error: $*" 1>&2
redEcho "Error: $*" >&2
exit 1
}

Expand Down

0 comments on commit 59eca5d

Please sign in to comment.