cli: Run command considers config (#755)

This commit is contained in:
Vecheslav Druzhbin 2021-09-18 18:27:01 +03:00 committed by GitHub
parent 68a6beb335
commit beace2c000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1945,6 +1945,8 @@ fn run(cfg_override: &ConfigOverride, script: String) -> Result<()> {
let exit = std::process::Command::new("bash")
.arg("-c")
.arg(&script)
.env("ANCHOR_PROVIDER_URL", cfg.provider.cluster.url())
.env("ANCHOR_WALLET", cfg.provider.wallet.to_string())
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()