[nostalgia/gfx/studio,studio] Fix CLI tool output to only show usage if no args given
All checks were successful
Build / build (push) Successful in 1m19s

This commit is contained in:
2025-07-24 21:16:38 -05:00
parent 6052798fea
commit 7461d832b6
2 changed files with 7 additions and 1 deletions

View File

@ -133,6 +133,9 @@ ox::Error cmdExportTilesheet(studio::Project &project, ox::SpanView<ox::CString>
"[-scale <int>]\n");
}
};
if (args.empty()) {
return {};
}
OX_REQUIRE(srcPath, clargs.getString("src-path").transformError(1, "no src path specified"));
OX_REQUIRE(dstPath, clargs.getString("dst-path").transformError(2, "no dst path specified"));
auto const palPath = clargs.getString("pal-path", "");

View File

@ -90,7 +90,10 @@ static ox::Error run(
return ox::Error{2, "failed to load project directory"};
}
Project project{*kctx.value, projectDir, projectDataDir};
return c.func(project, args + numCmdArgs);
return c.func(
project,
args.size() > numCmdArgs ?
args + numCmdArgs : ox::SpanView<ox::CString>{});
}
}
return ox::Error{1, "command not found"};