Skip to content

Commit

Permalink
Remove verbose message about server not running.
Browse files Browse the repository at this point in the history
see discussion
<#53 (comment)>.
If the server is not running and a `stop` command is issued, the
program should not print a verbose message to the terminal indicating
to the user that the server was not runnig. The output should appear
only if the user is in debug mode (PGENV_DEBUG has a value).
  • Loading branch information
fluca1978 committed May 11, 2022
1 parent a547e3e commit 85d0e4c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/pgenv
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ pgenv_stop_or_restart_instance(){
# if there is a pre-stop script to run, run it
if [ -x "$PGENV_SCRIPT_PRESTOP" ]; then
echo "Running pre-stop script [$PGENV_SCRIPT_PRESTOP]"
$PGENV_SCRIPT_PRESTOP "$PG_DATA"
$PGENV_SCRIPT_PRESTOP "$PG_DATA"
fi

$PG_CTL stop -D "$PG_DATA" "${PGENV_STOP_OPTIONS[@]}" &> /dev/null
Expand Down Expand Up @@ -924,7 +924,7 @@ pgenv_stop_or_restart_instance(){
# server not running
case $command in
stop)
echo "PostgreSQL $v not running"
pgenv_debug "PostgreSQL $v not running"
;;
restart)
pgenv_start_instance
Expand Down Expand Up @@ -1148,7 +1148,7 @@ case $1 in
v=$vv
fi
done

pgenv_debug "Selected version to build for '$2 $3' is $v"

esac
Expand Down Expand Up @@ -1245,7 +1245,7 @@ EOF
# Unpack the source.
$PGENV_TAR $TAR_OPTS $PG_TARBALL
fi

cd postgresql-$v

# patch the source tree if required
Expand Down

0 comments on commit 85d0e4c

Please sign in to comment.