Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dfx-orbit): Fix argument parsing and evaluation around dfx-orbit #397

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tools/dfx-orbit/src/canister/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct RequestCanisterInstallArgs {
#[clap(short, long, conflicts_with = "arg_file")]
pub argument: Option<String>,
/// The path to a file containing the argument to pass to the canister.
#[clap(short = 'f', long, conflicts_with = "arg")]
#[clap(short = 'f', long, conflicts_with = "argument")]
pub arg_file: Option<String>,
/// The asset canister name or ID to upload module chunks to.
#[clap(long)]
Expand Down Expand Up @@ -62,6 +62,13 @@ impl RequestCanisterInstallArgs {
let mode = self.mode.into();

let (module, module_extra_chunks) = if let Some(ref asset_canister) = self.asset_canister {
if self.max_chunk_len > Some(DEFAULT_MAX_CHUNK_LEN) {
bail!(
"--max-chunk-len must not be larger than {}",
DEFAULT_MAX_CHUNK_LEN
);
}

let asset_canister_id = dfx_orbit.canister_id(asset_canister)?;
let asset_agent = dfx_orbit.canister_agent(asset_canister_id)?;

Expand Down
Loading