cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.91k stars 116 forks source link

tart delete: return human-friendly error when local VM doesn't exist #910

Closed edigaryev closed 2 months ago

edigaryev commented 2 months ago

Current behavior:

% tart delete non-existent ; echo $?
failed to open lock file file:///Users/edi/.tart/vms/non-existent/config.json: No such file or directory
1

With this PR:

% tart delete non-existent ; echo $?
the specified VM "non-existent" does not exist
2

Related to https://github.com/cirruslabs/packer-plugin-tart/issues/168.