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

This commit is contained in:
Tom Linton 2022-03-19 06:19:01 +13:00 committed by GitHub
parent e567e14154
commit d42d147e6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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()