fix: add trace:on and trace:off

Closes #3553
This commit is contained in:
Jose Diaz-Gonzalez
2019-05-16 18:24:37 -04:00
parent c786b9e45e
commit 3fb8a576a0
9 changed files with 123 additions and 27 deletions

15
plugins/trace/subcommands/off Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
trace_off_cmd() {
declare desc="disables trace mode"
local cmd="trace"
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p "$DOKKU_ROOT/.dokkurc"
dokku_log_info1 "Disabling trace mode"
rm -f "$DOKKU_ROOT/.dokkurc/DOKKU_TRACE"
}
trace_off_cmd "$@"