fix: look harder for solana-web3.js install directory

This commit is contained in:
Michael Vines 2019-02-17 09:46:54 -08:00
parent 1c80365812
commit 5e6c97d0c8
1 changed files with 6 additions and 6 deletions

View File

@ -4,12 +4,12 @@ set -e
channel=$(
cd "$(dirname "$0")";
node -p '
let p;
try {
p = require("../lib/node_modules/@solana/web3.js/package.json");
} catch (err) {
p = require("../package.json");
}
let p = [
"../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");
p["testnetDefaultChannel"]
'
)