summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hansen2018-04-12 10:38:05 -0700
committerMichael Hansen2018-04-12 10:38:05 -0700
commit374a4ac52c79e2e21cadc38d0ccf038785f0f8fc (patch)
tree52482ad5171a7af595345063fb4322c9662a1302
parenta519a9e482fc7d0e7b0e21021a3a5acfb4e8de8d (diff)
downloadaur-374a4ac52c79e2e21cadc38d0ccf038785f0f8fc.tar.gz
Print helpful info after failing rather than before since nobody reads it anyway
-rw-r--r--PKGBUILD23
1 files changed, 12 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 7f1dcdeca5f3..23383009d335 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -61,21 +61,22 @@ build() {
yarn install --arch=${_vscode_arch}
- if ! ulimit -n 10000; then
- echo
- echo "*** ERROR: Could not raise the soft file limit. ***"
- echo "You may need to adjust your 'nofile' limit in /etc/security/limits.conf"
- echo "and possibly also raise your kernel-enforced limit if necessary."
- echo "Without this change, the gulp build will likely fail with EMFILE"
- echo
- exit 1
- fi
-
# The default memory limit may be too low for current versions of node
# to successfully build vscode. Uncomment this to set it to 2GB, or
# change it if this number still doesn't work for your system.
mem_limit="--max_old_space_size=2048"
- /usr/bin/node $mem_limit /usr/bin/gulp vscode-linux-${_vscode_arch}-min
+
+ if ! /usr/bin/node $mem_limit /usr/bin/gulp vscode-linux-${_vscode_arch}-min
+ then
+ echo
+ echo "*** NOTE: If the build failed due to running out of file handles (EMFILE),"
+ echo "*** you will need to raise your max open file limit."
+ echo "*** This can be done by setting a higher limit in /etc/security/limits.conf,"
+ echo "*** rebooting (or logging out and back in), and then running"
+ echo "*** 'ulimit -n 10000' (or higher) before re-attempting to build this package."
+ echo
+ exit 1
+ fi
# Patch the startup script to know where the app is installed, rather
# than guessing...