aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-10-01 16:48:23 +0000
committerng0 <ng0@n0.is>2019-10-01 16:48:23 +0000
commit040475967c22b01e6d553143c54d8babdb686081 (patch)
tree2076363267607172088828ba83325a03fdcbd6e3 /configure
parent6e138efee0d7c7d1479a69288c502779033ce7e0 (diff)
downloadwallet-core-040475967c22b01e6d553143c54d8babdb686081.tar.xz
configure: test for yarn help result containing "No such file" etc,
so that we can catch the yarn possibly installed by cmdtest. This can lead to issues, and I don't understand why apt and maybe other PMs allow namespace collisions, or resolve them in a way which allows this to happen.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure b/configure
index 812d0460b..ab64c25c5 100755
--- a/configure
+++ b/configure
@@ -83,11 +83,23 @@ else
#echo "Using node ${node_version}"
if ! node -p 'process.exit(!(/v([0-9]+)/.exec(process.version)[1] >= 4))'; then
echo 'Your node version is too old, use Node 4.x or newer'
+ exit 1
fi
fi
if ! existence yarn; then
echo 'ERROR: yarn missing. See https://yarnpkg.com/en/docs/install'
+ exit 1
+fi
+
+if existence cmdtest; then
+ if yarn help | grep "No such file or directory"; then
+ echo "ERROR: wrong yarn binary installed, please remove the"
+ echo "ERROR: conflicting binary before continuing."
+ exit 1
+ fi
+ echo "WARNING: cmdtest is installed, this can lead to known issues"
+ echo "WARNING: with yarn."
fi
# for the weird systems and sandboxes, only as a anotice.