Skip to content

Commit

Permalink
fix: correct issues where docker ps is truncated
Browse files Browse the repository at this point in the history
This should actually be refactored to avoid the grep call completely, but the current fix will correct the issue for now.

Refs dokku#131
  • Loading branch information
josegonzalez committed Dec 2, 2018
1 parent 354309f commit 6ed6db2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common-functions
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ service_stop() {
declare SERVICE="$1"
local SERVICE_ROOT="$PLUGIN_DATA_ROOT/$SERVICE";
local SERVICE_NAME="$(get_service_name "$SERVICE")"
local ID=$(docker ps -f status=running | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
local ID=$(docker ps -f status=running --no-trunc | grep -e "$SERVICE_NAME$" | awk '{print $1}') || true
[[ -z $ID ]] && dokku_log_warn "Service is already stopped" && return 0

if [[ -n $ID ]]; then
Expand Down

0 comments on commit 6ed6db2

Please sign in to comment.