Skip to content

Commit

Permalink
cli: Fix the default JS update command being incorrect (#3337)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto authored Oct 29, 2024
1 parent d34c04a commit 4cdb0eb
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cli/src/checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,13 @@ pub fn check_anchor_version(cfg: &WithPath<Config>) -> Result<()> {
.and_then(|ver| VersionReq::parse(ver).ok())
.filter(|ver| !ver.matches(&cli_version));

let update_cmd = match &cfg.toolchain.package_manager {
Some(pkg_manager) => match pkg_manager {
if let Some(ver) = mismatched_ts_version {
let update_cmd = match cfg.toolchain.package_manager.clone().unwrap_or_default() {
PackageManager::NPM => "npm update",
PackageManager::Yarn => "yarn upgrade",
PackageManager::PNPM => "pnpm update",
},
None => "npm update",
};
};

if let Some(ver) = mismatched_ts_version {
eprintln!(
"WARNING: `@coral-xyz/anchor` version({ver}) and the current CLI version\
({cli_version}) don't match.\n\n\t\
Expand Down

0 comments on commit 4cdb0eb

Please sign in to comment.