fix: preserve account data and validate CLI operations

This commit is contained in:
objz committed 2026-10-01 17:40:14 +02:00
1 parent 22a3eebe78
commit 2b6750a971
11 files changed
+300 -119

No files matched your search

+1
View File
@@ -23,6 +23,7 @@ pub fn required_arg<'a>(matches: &'a ArgMatches, name: &str) -> Result<&'a str,
// checks for instance.json rather than just the directory, since a folder
// without config is just a sad empty directory pretending to be an instance
pub fn require_instance(instances_dir: &std::path::Path, name: &str) -> Result<(), io::Error> {
crate::instance::manager::validate_name(name).map_err(io::Error::other)?;
if !instances_dir.join(name).join("instance.json").exists() {
return Err(io::Error::other(format!("Instance '{name}' not found")));
}