Skip to content

Commit 7b8867b

Browse files
committed
fixup! Improve error handling using a fail-fast approach
1 parent 2748ae7 commit 7b8867b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/startNeo4j.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if [ -n "${neo4jNotRunning}" ]; then
5050

5151
# Check if there is already a process that listens to the Neo4j HTTP port
5252
port_listener_process_id=$( lsof -t -i:"${NEO4J_HTTP_PORT}" -sTCP:LISTEN || true )
53-
if [ -z "${port_listener_process_id}" ]; then
53+
if [ -n "${port_listener_process_id}" ]; then
5454
echo "startNeo4j: There is already a process that listens to port ${NEO4J_HTTP_PORT}"
5555
ps -p "${port_listener_process_id}"
5656
echo "startNeo4j: Use this command to stop it: kill -9 \$( lsof -t -i:${NEO4J_HTTP_PORT} -sTCP:LISTEN )"

0 commit comments

Comments
 (0)