Skip to content

Commit

Permalink
fix: ls showing gameitems (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
francisdb authored Dec 18, 2024
1 parent d018668 commit e9d9212
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ figment = { version = "0.10", features = ["toml", "env"] }
toml = "0.8.19"
is_executable = "1.0.4"
regex = { version = "1.11.1", features = [] }
vpin = { version = "0.17.1" }
vpin = { version = "0.17.2" }
rust-ini = "0.21.1"
edit = "0.1.5"
jojodiff = "0.1.2"
Expand Down
10 changes: 6 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ const CMD_PATCH: &str = "patch";
const CMD_VERIFY: &str = "verify";
const CMD_NEW: &str = "new";

const CMD_LS: &str = "ls";

const CMD_SIMPLE_FRONTEND: &str = "simplefrontend";

const CMD_CONFIG: &str = "config";
Expand Down Expand Up @@ -434,14 +436,14 @@ fn handle_command(matches: ArgMatches) -> io::Result<ExitCode> {
}
_ => unreachable!(),
},
Some(("ls", sub_matches)) => {
Some((CMD_LS, sub_matches)) => {
let path = sub_matches
.get_one::<String>("VPXPATH")
.map(|s| s.as_str())
.unwrap_or_default();

let expanded_path = expand_path_exists(path)?;
ls(expanded_path.as_ref())?;
ls(&expanded_path)?;
Ok(ExitCode::SUCCESS)
}
Some((CMD_EXTRACT, sub_matches)) => {
Expand Down Expand Up @@ -910,8 +912,8 @@ fn build_command() -> Command {
),
)
.subcommand(
Command::new("ls")
.about("Show a vpx file content")
Command::new(CMD_LS)
.about("Show the vpx file contents")
.arg(
arg!(<VPXPATH> "The path to the vpx file")
.required(true),
Expand Down

0 comments on commit e9d9212

Please sign in to comment.