fix: preserve CLI log output and avoid incidental migrations
This commit is contained in:
1 parent
7ea4860202
commit
cf9007fa06
7 files changed
+114
-81
No files matched your search
+1
-2
@@ -20,8 +20,7 @@ pub fn required_arg<'a>(matches: &'a ArgMatches, name: &str) -> Result<&'a str,
|
||||
.ok_or_else(|| io::Error::other(format!("missing required argument '{name}'")))
|
||||
}
|
||||
|
||||
// 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
|
||||
// A directory without instance.json is not 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() {
|
||||
|
||||
Reference in new issue
Block a user