fix: switch default profile to terminal and fixed some comments

This commit is contained in:
objz committed 2026-04-18 19:44:59 +02:00
1 parent 971375bf1f
commit 52787b57c7
71 files changed
+671 -188

No files matched your search

+3
View File
@@ -1,3 +1,4 @@
// shared CLI helpers: confirmation prompts, arg extraction, instance validation
use std::io::{self, Write};
use clap::ArgMatches;
@@ -17,6 +18,8 @@ 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
pub fn require_instance(instances_dir: &std::path::Path, name: &str) -> Result<(), io::Error> {
if !instances_dir.join(name).join("instance.json").exists() {
return Err(io::Error::other(format!("Instance '{name}' not found")));