cli: Add NODE_OPTIONS env variable with DNS fix (#915)

This commit is contained in:
Kirill Fomichev 2021-10-23 23:50:47 +03:00 committed by GitHub
parent 6a19cc48ef
commit 95d46976d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -5,7 +5,7 @@ rust:
cache: cargo
env:
global:
- NODE_VERSION="14.7.0"
- NODE_VERSION="17.0.1"
- SOLANA_CLI_VERSION="1.7.11"
git:
submodules: true

View File

@ -1477,6 +1477,16 @@ fn test(
let url = cluster_url(cfg);
let node_options = format!(
"{} --dns-result-order=ipv4first",
match std::env::var_os("NODE_OPTIONS") {
Some(value) => value
.into_string()
.map_err(std::env::VarError::NotUnicode)?,
None => "".to_owned(),
}
);
// Setup log reader.
let log_streams = stream_logs(cfg, &url);
@ -1497,6 +1507,7 @@ fn test(
.args(args)
.env("ANCHOR_PROVIDER_URL", url)
.env("ANCHOR_WALLET", cfg.provider.wallet.to_string())
.env("NODE_OPTIONS", node_options)
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()