rgs1/zk_shell

Provide option for overwriting existing files

Closed this issue · 1 comments

There should exist a procedure which allows for the overwriting of files when attempting to copy files to ZK. Currently, if the file node already exists, an exception is raised, and the execution halted:

Copy failed; it may have partially completed. To return to a stable state, either fix the issue and re-run the command or manually revert.
Failure reason:
znode /path/to/file.yml exists

I can see two possible solutions to this:

  1. Rather than raising an exception and exiting, an option for user input could be given:
    znode /path/to/file.yml exists -- overwrite? [Y/n]: 
  1. Offering a dedicated command for overwriting existing files, so that you could choose between cp and say, update when sending your file.

Closed with no comment? :(