zng_env

Function migrate_config

source
pub fn migrate_config(new_path: impl AsRef<Path>) -> Result<()>
Expand description

Copied all config to new_path and saves it as the config path.

If copying and saving path succeeds make a best effort to wipe the previous config dir. If copy and save fails makes a best effort to undo already made copies.

The new_path must not exist or be empty.