#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"

cmd-trace-off() {
  declare desc="disables trace mode"
  declare cmd="trace"
  [[ "$1" == "$cmd" ]] && shift 1

  dokku_log_info1 "Disabling trace mode"
  [[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p "$DOKKU_ROOT/.dokkurc"
  rm -f "$DOKKU_ROOT/.dokkurc/DOKKU_TRACE"
}

cmd-trace-off "$@"
