Add help text to import url argument
This commit is contained in:
1 parent
a3ef4b39d0
commit
3d8143c4d1
2 files changed
+6
-3
No files matched your search
+4
-1
@@ -9,7 +9,10 @@ pub struct Args {
|
||||
#[arg(value_enum)]
|
||||
pub game: Game,
|
||||
|
||||
pub build_path: Option<String>,
|
||||
#[arg(
|
||||
help = "URL of build to import on startup. Needs to use custom protocol schema, e.g. `pob://pobbin/<id>`"
|
||||
)]
|
||||
pub import_url: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, ValueEnum)]
|
||||
|
||||
+2
-2
@@ -170,9 +170,9 @@ impl LuaInstance {
|
||||
// SAFETY: use `unsafe_new` to allow loading of C modules
|
||||
let lua = unsafe { Lua::unsafe_new() };
|
||||
|
||||
// expose build arg to lua
|
||||
// expose import url to lua
|
||||
let args = Args::parse();
|
||||
let args_table = lua.create_sequence_from(std::iter::once(args.build_path))?;
|
||||
let args_table = lua.create_sequence_from(std::iter::once(args.import_url))?;
|
||||
lua.globals().set("arg", args_table)?;
|
||||
|
||||
Self::register_package_paths(&lua)?;
|
||||
|
||||
Reference in new issue
Block a user