fix: look harder for solana-web3.js install directory
This commit is contained in:
parent
1c80365812
commit
5e6c97d0c8
|
@ -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"]
|
||||
'
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue