Pārlūkot izejas kodu

cli: Fix npm install command in fallback (#1643)

Tom Linton 3 gadi atpakaļ
vecāks
revīzija
d42d147e6a
2 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 1 0
      CHANGELOG.md
  2. 1 0
      cli/src/lib.rs

+ 1 - 0
CHANGELOG.md

@@ -31,6 +31,7 @@ incremented for features.
 * lang: implement `Key` for `Pubkey` again, so `associated_token::*` constraints can use pubkey targets again ([#1601](https://github.com/project-serum/anchor/pull/1601)).
 * lang: adjust error code so `#[error_code]` works with just importing `anchor_lang::error_code` ([#1610](https://github.com/project-serum/anchor/pull/1610)).
 * ts: fix `spl-token` coder account parsing ([#1604](https://github.com/project-serum/anchor/pull/1604)).
+* cli: fix `npm install` fallback if `yarn` install doesn't work ([#1643](https://github.com/project-serum/anchor/pull/1643)).
 
 ### Breaking
 

+ 1 - 0
cli/src/lib.rs

@@ -575,6 +575,7 @@ fn init(cfg_override: &ConfigOverride, name: String, javascript: bool, no_git: b
     if !yarn_result.status.success() {
         println!("Failed yarn install will attempt to npm install");
         std::process::Command::new("npm")
+            .arg("install")
             .stdout(Stdio::inherit())
             .stderr(Stdio::inherit())
             .output()