Skip to content
This repository was archived by the owner on Jan 4, 2025. It is now read-only.

Commit 7af6af0

Browse files
committed
Check for no args passed before checking for port reuse
1 parent 287228e commit 7af6af0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

getPort.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ do
2323
# File does not exist, therefore we found an open port to use
2424
CHOSENPORT=$PORT
2525
break
26-
elif [[ "$(cat "$FOLDER/$PORT")" == "$1" ]]; then
26+
elif [[ $# -ne 0 ]] && [[ "$(cat "$FOLDER/$PORT")" == "$1" ]]; then
2727
# File contents have the ID that we are currently getting a port for, reuse that port
2828
CHOSENPORT=$PORT
2929
break

0 commit comments

Comments
 (0)