Skip to content

Commit 3965f6b

Browse files
committed
chore: redirect error messages to stderr in various scripts
1 parent fded207 commit 3965f6b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

scripts/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if ! command -v python >/dev/null 2>&1; then
1414
fi
1515

1616
if ! python -c "import build" &> /dev/null; then
17-
echo "[ERROR]: 'build' python package is not installed!"
17+
echo "[ERROR]: 'build' python package is not installed!" >&2
1818
exit 1
1919
fi
2020
## --- Base --- ##

scripts/bump-version.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ done
8282

8383

8484
if [ -z "${_BUMP_TYPE:-}" ]; then
85-
echo "[ERROR]: Bump type is empty, use '-b=' or '--bump-type=' argument!"
85+
echo "[ERROR]: Bump type is empty, use '-b=' or '--bump-type=' argument!" >&2
8686
exit 1
8787
fi
8888

8989
if [ "${_BUMP_TYPE}" != "major" ] && [ "${_BUMP_TYPE}" != "minor" ] && [ "${_BUMP_TYPE}" != "patch" ]; then
90-
echo "[ERROR]: Bump type '${_BUMP_TYPE}' is invalid, should be: 'major', 'minor' or 'patch'!"
90+
echo "[ERROR]: Bump type '${_BUMP_TYPE}' is invalid, should be: 'major', 'minor' or 'patch'!" >&2
9191
exit 1
9292
fi
9393

@@ -138,7 +138,7 @@ main()
138138
if [ "${_IS_TAG}" == true ]; then
139139
echo "[INFO]: Tagging 'v${_new_version}'..."
140140
if git rev-parse "v${_new_version}" > /dev/null 2>&1; then
141-
echo "[ERROR]: 'v${_new_version}' tag is already exists!"
141+
echo "[ERROR]: 'v${_new_version}' tag is already exists!" >&2
142142
exit 1
143143
fi
144144
git tag "v${_new_version}" || exit 2

scripts/changelog.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if ! command -v gh >/dev/null 2>&1; then
1818
fi
1919

2020
if ! gh auth status >/dev/null 2>&1; then
21-
echo "[ERROR]: You need to login: 'gh auth login'!"
21+
echo "[ERROR]: You need to login: 'gh auth login'!" >&2
2222
exit 1
2323
fi
2424
## --- Base --- ##

scripts/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ if ! command -v gh >/dev/null 2>&1; then
1919
fi
2020

2121
if ! gh auth status >/dev/null 2>&1; then
22-
echo "[ERROR]: You need to login: 'gh auth login'!"
22+
echo "[ERROR]: You need to login: 'gh auth login'!" >&2
2323
exit 1
2424
fi
2525

scripts/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ done
7070

7171
if [ "${_IS_COVERAGE}" == true ]; then
7272
if ! python -c "import pytest_cov" &> /dev/null; then
73-
echo "[ERROR]: 'pytest-cov' python package is not installed!"
73+
echo "[ERROR]: 'pytest-cov' python package is not installed!" >&2
7474
exit 1
7575
fi
7676
fi

0 commit comments

Comments
 (0)