Skip to content

Commit 4684546

Browse files
committed
better
1 parent 4530510 commit 4684546

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

java/ql/automodel/publish.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
99
exit 0
1010
fi
1111

12-
# If there's an $1 argument, then check it's "override-release"
13-
if [ -n "${1:-}" ]; then
14-
if [ "$1" != "override-release" ]; then
15-
echo "Error: The only valid argument is 'override-release'"
16-
exit 1
17-
fi
12+
# Check that either there are 0 or 1 arguments, and if 1 argument then check that it is "override-release"
13+
if [ $# -gt 1 ] || [ $# -eq 1 ] && [ "$1" != "override-release" ]; then
14+
echo "Error: Invalid arguments. Please run './publish --help' for usage information."
15+
exit 1
1816
fi
1917

2018
# If we're publishing the codeml-automodel release then we will checkout the sha specified in the release.

0 commit comments

Comments
 (0)