Closed ncs29 closed 4 months ago
The ubiquitous cp(1)
command doesn't ask for the confirmation either.
This behavior has been pretty useful when re-running Tart in a pipeline like this multiple times:
tart clone ghcr.io/cirruslabs/macos-sonoma-base:latest macos && tart run macos
After fiddling with the VM you press Ctrl+C and re-run the pipeline, effortlessly getting a fresh VM each time without the need to tart delete
.
Got it @edigaryev , I understand your point regarding ease of use with CI pipelines.
In that case, does it make sense to implement the reverse i.e. have a flag (eg: --no-overwrite
or -n
) that throws an error if target VM already exists (similar to cp -n
flag)? IMHO, it would be nice to provide an option to clone VMs "safely", without having to manually check using tart list
/tart get
commands.
Thanks!
Would you mind explaining your use-case a bit more? Are you invoking the tart
from some kind of script, or manually?
I wonder if it's possible to solve this without introducing any additional command-line arguments at all 🤔
I wonder if it's possible to solve this without introducing any additional command-line arguments at all 🤔
On second thought, I suppose it is possible, I was able to solve my problem by having a wrapper script to set up my build VM which checks if the target VM exists and then safely clone VM. Please feel free to close this issue. Thanks!
Currently, when cloning a VM, if the target VM already exists, it is overwritten right away without any warnings or notice.
The request is as follows:
--overwrite
) to overwrite the target VM even if it exists, without any prompts/errors so that users can use it if needed.This will ensure VMs are not deleted accidentally due to incorrect/typo commands.
Thanks!