fix: use testnetDefaultChannel when install bpf-sdk

This commit is contained in:
Jack May 2020-01-06 15:47:19 -08:00 committed by Michael Vines
parent 09f004c047
commit 05491f7fb7
1 changed files with 2 additions and 5 deletions

View File

@ -10,11 +10,12 @@ channel=$(
cd "$(dirname "$0")";
node -p '
let p = [
"../../package.json",
"../lib/node_modules/@solana/web3.js/package.json",
"../@solana/web3.js/package.json",
"../package.json"
].find(require("fs").existsSync);
if (!p) throw new Error("Unable to locate solana-web3.js directory");
if (!p) throw new Error("Unable to locate package.json");
require(p)["testnetDefaultChannel"]
'
)
@ -22,10 +23,6 @@ channel=$(
if [[ -n $2 ]]; then
channel=$2
fi
[[ $channel = edge || $channel = beta ]] || {
echo "Error: Invalid channel: $channel"
exit 1
}
echo "Installing $channel BPF SDK into $installDir"