From c37228c7e3809ae550be2fc89148ba97efb9bfee Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Thu, 6 Jun 2019 19:33:10 +0900 Subject: [PATCH] Travis: fix macOS build due to the old default version of Node.js appdmg recently dropped support for Node.js < 8.5 --- .travis/osx..before_install.sh | 9 +++++++++ .travis/osx..install.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis/osx..before_install.sh b/.travis/osx..before_install.sh index 75b692e97..f9481c496 100644 --- a/.travis/osx..before_install.sh +++ b/.travis/osx..before_install.sh @@ -1,3 +1,12 @@ #!/usr/bin/env bash brew update + +# appdmg doesn't work with old versions of Node.js +nvm install --lts + +# Avoid permission issues with npm and node-gyp +# https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally +mkdir ~/.npm-global +npm config set prefix '~/.npm-global' +export PATH=~/.npm-global/bin:$PATH diff --git a/.travis/osx..install.sh b/.travis/osx..install.sh index 3e49695f4..68d50790b 100644 --- a/.travis/osx..install.sh +++ b/.travis/osx..install.sh @@ -14,4 +14,4 @@ if [ -z "$QT5" ]; then brew install qt@4 fi -sudo npm install -g appdmg +npm install -g appdmg