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

View File

@ -4,12 +4,12 @@ set -e
channel=$( channel=$(
cd "$(dirname "$0")"; cd "$(dirname "$0")";
node -p ' node -p '
let p; let p = [
try { "../lib/node_modules/@solana/web3.js/package.json",
p = require("../lib/node_modules/@solana/web3.js/package.json"); "../@solana/web3.js/package.json",
} catch (err) { "../package.json"
p = require("../package.json"); ].find(require("fs").existsSync);
} if (!p) throw new Error("Unable to locate solana-web3.js directory");
p["testnetDefaultChannel"] p["testnetDefaultChannel"]
' '
) )