provisioning-core/nulib/primitives/io/clean.nu

13 lines
468 B
Text
Raw Permalink Normal View History

use primitives/io/logging.nu [is-debug-enabled]
use primitives/io/interface.nu [_ansi _print]
export def cleanup [wk_path: string] {
if not (is-debug-enabled) and ($wk_path | path exists) {
rm --force --recursive $wk_path
} else {
_print $"(_ansi default_dimmed)______________________(_ansi reset)"
_print $"(_ansi default_dimmed)Work files not removed"
_print $"(_ansi default_dimmed)wk_path:(_ansi reset) ($wk_path)"
}
}