externalTests: Neutralize npm hooks instead of replacing pragmas twice

- This also has the nice effect of stopping projects from trying to compile contracts during installation
This commit is contained in:
Kamil Śliwak
2021-11-08 16:37:23 +01:00
parent 7b7cc081db
commit c090ff9d83
6 changed files with 13 additions and 10 deletions
+8
View File
@@ -104,6 +104,14 @@ function neutralize_package_lock
rm --force --verbose package-lock.json
}
function neutralize_package_json_hooks
{
printLog "Disabling package.json hooks..."
[[ -f package.json ]] || fail "package.json not found"
sed -i 's|"prepublish": *".*"|"prepublish": ""|g' package.json
sed -i 's|"prepare": *".*"|"prepare": ""|g' package.json
}
function force_truffle_solc_modules
{
local soljson="$1"