Skip to content

Commit

Permalink
cli: fixes bug where the wrong exit status is reported (#2370)
Browse files Browse the repository at this point in the history
  • Loading branch information
RuvenSalamon committed Feb 6, 2023
1 parent cd63049 commit 010b400
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -24,6 +24,7 @@ The minor version will be incremented upon a breaking change and the patch versi

- cli: Don't regenerate idl in read_all_programs(). ([#2332](https://github.com/coral-xyz/anchor/pull/2332)).
- ts: `provider.simulate` will send the transaction with `sigVerify: false` if no `signers` are present ([#2331](https://github.com/coral-xyz/anchor/pull/2331)).
- cli: Failing commands will return the correct exit status. ([#2370](https://github.com/coral-xyz/anchor/pull/2370)).
- idl: Update the IDL program to use non-deprecated account types ([#2365](https://github.com/coral-xyz/anchor/pull/2365)).
- ts: Enum fields weren't being converted from snake_case to camelCase ([#2378](https://github.com/coral-xyz/anchor/pull/2378)).

Expand Down
6 changes: 5 additions & 1 deletion avm/src/anchor/main.rs
Expand Up @@ -14,11 +14,15 @@ fn main() -> anyhow::Result<()> {
version
);
}
Command::new(binary_path)
let exit = Command::new(binary_path)
.args(args)
.spawn()?
.wait_with_output()
.expect("Failed to run anchor-cli");

if !exit.status.success() {
std::process::exit(exit.status.code().unwrap_or(1));
}

Ok(())
}

1 comment on commit 010b400

@vercel
Copy link

@vercel vercel bot commented on 010b400 Feb 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

anchor-docs – ./

www.anchor-lang.com
anchor-docs-git-master-200ms.vercel.app
anchor-docs-200ms.vercel.app
anchor-lang.com

Please sign in to comment.