From 1a1e1b5e8b83308e2d90a7c0f40b0268f0060b77 Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Tue, 7 Jun 2016 13:25:45 -0300 Subject: [PATCH] Use sh for postinstall as alpine has no bash Remove pipefail from postinstall.sh and use POSIX comparison --- package.json | 2 +- postinstall.sh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 90764154..ab9f639d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "resin-supervisor", "version": "1.11.0", "scripts": { - "postinstall": "bash postinstall.sh", + "postinstall": "sh postinstall.sh", "start": "./entry.sh" }, "dependencies": { diff --git a/postinstall.sh b/postinstall.sh index 0ed001ba..799044c9 100755 --- a/postinstall.sh +++ b/postinstall.sh @@ -1,7 +1,6 @@ set -o errexit -set -o pipefail -if [[ $NODE_ENV == 'production' ]]; then +if [ "$NODE_ENV" = "production" ]; then # Remove node-gyp cache rm -rf ~/.node-gyp/ # Remove cached git deps