This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #791 from trufflesuite/feat/filecoin-clientretrieve
- Loading branch information
Showing
19 changed files
with
2,851 additions
and
2,821 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
engine-strict=true | ||
engine-strict=false | ||
save-exact=true | ||
sign-git-commit=true | ||
sign-git-tag=true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// To use this script, run `ts-node path/to/skip-if-less-than-node-12.ts || <command>` | ||
// This script will "succeed" if less than node@12, causing <command> to not execute | ||
// but also make look like the overall command was successful | ||
|
||
const majorVersionStringMatch = /^v([0-9]+)\./.exec(process.version); | ||
|
||
if (!majorVersionStringMatch || majorVersionStringMatch.length < 2) { | ||
console.error( | ||
"ERROR: Could not parse process.version for some reason. This shouldn't happen." | ||
); | ||
process.exit(0); // we exit with code 0 to prevent further scripts from running | ||
} | ||
|
||
const majorVersion = parseInt(majorVersionStringMatch[1], 10); | ||
|
||
if (majorVersion < 12) { | ||
console.log( | ||
`Skipping following command as the NodeJS version is ${majorVersion}, and it needs to be at least 12 to continue.` | ||
); | ||
process.exit(0); | ||
} else { | ||
process.exit(1); | ||
} |
Oops, something went wrong.