Skip to content

Commit

Permalink
Merge branch 'sat-ic-admin-version-newline-trim' into 'main'
Browse files Browse the repository at this point in the history
fix(cli): Ensure ic-admin version string does not have a newline

See merge request dfinity-lab/core/release!781
  • Loading branch information
sasa-tomic committed Jul 5, 2023
2 parents f194640 + 1d8291c commit 193b45a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rs/cli/src/ic_admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,10 @@ impl Cli {

/// Returns a path to downloaded ic-admin binary
async fn download_ic_admin(version: Option<String>) -> Result<String> {
let version = version.unwrap_or_else(|| defaults::DEFAULT_IC_ADMIN_VERSION.to_string());
let version = version
.unwrap_or_else(|| defaults::DEFAULT_IC_ADMIN_VERSION.to_string())
.trim()
.to_string();
let home_dir = dirs::home_dir()
.and_then(|d| d.to_str().map(|s| s.to_string()))
.ok_or_else(|| anyhow::format_err!("Cannot find home directory"))?;
Expand Down
1 change: 1 addition & 0 deletions rs/ic-canisters/src/governance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub async fn governance_canister_version(nns_url: Url) -> Result<GovernanceCanis
)
.await?,
)?
.trim()
.to_string();

Ok(GovernanceCanisterVersion {
Expand Down

0 comments on commit 193b45a

Please sign in to comment.