mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 04:00:36 +01:00
support --quiet and split up data access from presentation
This commit is contained in:
@@ -166,14 +166,14 @@ ps_scale() {
|
||||
fi
|
||||
}
|
||||
|
||||
get_restart_policies() {
|
||||
declare desc="strips docker options and prints restart policies"
|
||||
local -r phase_file_path=$1
|
||||
[[ -r "$phase_file_path" ]] && sed -e '/^--restart=/!d' -e 's/^--restart=/ /' < "$phase_file_path"
|
||||
}
|
||||
|
||||
get_raw_restart_policies() {
|
||||
declare desc="strips docker options and prints raw restart policies"
|
||||
local -r phase_file_path=$1
|
||||
[[ -r "$phase_file_path" ]] && sed -e '/^--restart=/!d' < "$phase_file_path"
|
||||
}
|
||||
|
||||
get_restart_policies() {
|
||||
declare desc="strips docker options and prints restart policies"
|
||||
local -r phase_file_path=$1
|
||||
get_raw_restart_policies "$phase_file_path" | sed -e 's/^--restart=//g'
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ ps_restart_policy_cmd() {
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$2" && local APP="$2"
|
||||
|
||||
echo "$APP restart-policy:"
|
||||
dokku_log_info2_quiet "$APP restart-policy:"
|
||||
get_restart_policies "$(get_phase_file_path "$passed_phases")"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user