Skip to content

Commit 1ed3d8d

Browse files
committed
refactor: remove unnecessary file descriptor number 1 in redirections ➡️
1 parent c260f20 commit 1ed3d8d

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

bin/cp-into-docker-run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ redPrint() {
2929
}
3030

3131
die() {
32-
redPrint "Error: $*" 1>&2
32+
redPrint "Error: $*" >&2
3333
exit 1
3434
}
3535

@@ -242,7 +242,7 @@ trap cleanupWhenExit EXIT
242242
########################################
243243

244244
logAndRun() {
245-
$verbose && printf '%s\n' "[$PROG] $*" 1>&2
245+
$verbose && printf '%s\n' "[$PROG] $*" >&2
246246
"$@"
247247
}
248248

bin/show-busy-java-threads

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ blueOutput() {
101101
}
102102

103103
die() {
104-
redOutput "Error: $*" 1>&2
104+
redOutput "Error: $*" >&2
105105
exit 1
106106
}
107107

bin/uq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ yellowPrint() {
6060
}
6161

6262
die() {
63-
redPrint "Error: $*" 1>&2
63+
redPrint "Error: $*" >&2
6464
exit 1
6565
}
6666

legacy-bin/cp-svn-url

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ readonly dir="${1:-.}"
7878
# NOTE: DO NOT declare var url as readonly in ONE line!
7979
url="$(svn info "${dir}" | awk '/^URL: /{print $2}')"
8080
if [ -z "${url}" ]; then
81-
echo "Fail to get svn url!" 1>&2
81+
echo "Fail to get svn url!" >&2
8282
exit 1
8383
fi
8484

test-cases/bump-scripts-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ logAndRun() {
4949
}
5050

5151
die() {
52-
redPrint "Error: $*" 1>&2
52+
redPrint "Error: $*" >&2
5353
exit 1
5454
}
5555

test-cases/my_unit_test_lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fail() {
4040
}
4141

4242
die() {
43-
redEcho "Error: $*" 1>&2
43+
redEcho "Error: $*" >&2
4444
exit 1
4545
}
4646

0 commit comments

Comments
 (0)