all 'destructive' commands such as nuke, eval, imatrix fill, etc... are affected
attempting to run a destructive command will:
pop a warning log instructing you about this
wherever possible, tell the user what raw juju commands would be executed
ask the user for confirmation
to disable the protection you can:
set a JHACK_PROFILE=devmode envvar before your command.
edit the jhack config in ~/.config/jhack/config.toml and set [general]enable_destructive_commands_NO_PRODUCTION_zero_guarantees = true
full list of commands and whether they are destructive:
"show-relation" NO
"show-stored" NO
"tail" NO
"record" NO
"ffwd" NO
"print-env" NO
"unbork-juju" YES
"fire" YES
"pull-cmr" YES
"update" NO
"init" NO
"func" NO
"sync-packed" NO
"lobotomy" YES
"provision" YES
"replay.install" YES
"replay.purge" YES
"replay.list" NO
"replay.dump" NO
"replay.emit" YES
"view" NO
"fill" NO
"clear" NO
"version" NO
"show-relation" NO
"show-stored" NO
"tail" NO
"ffwd" NO
"jenv" NO
"list-endpoints" NO
"sync" YES
"nuke" YES
"deploy" YES
"fire" YES
"pull-cmr" NO (already has confirmation prompt)
"charm-info" YES
"eval" YES
"script" YES
"default" NO
"current" NO
"snapshot" NO
"state-apply" YES
This PR implements a devmode safeguard for jhack
all 'destructive' commands such as nuke, eval, imatrix fill, etc... are affected
attempting to run a destructive command will:
to disable the protection you can:
~/.config/jhack/config.toml
and set[general]enable_destructive_commands_NO_PRODUCTION_zero_guarantees = true
full list of commands and whether they are destructive:
"show-relation" NO "show-stored" NO "tail" NO "record" NO "ffwd" NO "print-env" NO "unbork-juju" YES "fire" YES "pull-cmr" YES "update" NO "init" NO "func" NO "sync-packed" NO "lobotomy" YES "provision" YES "replay.install" YES "replay.purge" YES "replay.list" NO "replay.dump" NO "replay.emit" YES "view" NO "fill" NO "clear" NO "version" NO "show-relation" NO "show-stored" NO "tail" NO "ffwd" NO "jenv" NO "list-endpoints" NO "sync" YES "nuke" YES "deploy" YES "fire" YES "pull-cmr" NO (already has confirmation prompt) "charm-info" YES "eval" YES "script" YES "default" NO "current" NO "snapshot" NO "state-apply" YES