From f52673fc7284e58af8c04533e82b76bf7add72cf Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 10 Jul 2019 09:29:02 +0100 Subject: [PATCH] build: use /usr/bin/env to load bash On BSD platforms, there is a clear seperation between the OS and third party packages. Here, bash is a third party package so it won't be installed to /bin. FreeBSD: /usr/local/bin/bash NetBSD: /usr/pkg/bin/bash OpenBSD: /usr/ports/bin/bash As such, we need to use /usr/bin/env to launch these scripts. Credit: @rsmarples PR-URL: https://github.com/npm/cli/pull/212 Close: #212 Reviewed-by: @isaacs --- configure | 2 +- scripts/clean-old.sh | 2 +- scripts/dep-update | 2 +- scripts/dev-dep-update | 2 +- scripts/release.sh | 2 +- scripts/relocate.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index b13c8d0d73e22..f177f43a3a4da 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # set configurations that will be "sticky" on this system, # surviving npm self-updates. diff --git a/scripts/clean-old.sh b/scripts/clean-old.sh index cda80f2f4845d..32a203e4a5f7e 100755 --- a/scripts/clean-old.sh +++ b/scripts/clean-old.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # look for old 0.x cruft, and get rid of it. # Should already be sitting in the npm folder. diff --git a/scripts/dep-update b/scripts/dep-update index 52abd518c317b..006de17c7203a 100755 --- a/scripts/dep-update +++ b/scripts/dep-update @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash node . install --save $1@$2 &&\ node scripts/gen-dev-ignores.js &&\ git add node_modules package.json package-lock.json &&\ diff --git a/scripts/dev-dep-update b/scripts/dev-dep-update index c8c9604759165..cb0b783a837f4 100755 --- a/scripts/dev-dep-update +++ b/scripts/dev-dep-update @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash node . install --save --save-dev $1@$2 &&\ node scripts/gen-dev-ignores.js &&\ git add package.json package-lock.json &&\ diff --git a/scripts/release.sh b/scripts/release.sh index 705f21502adfb..e071c7ededaf7 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # script for creating a zip and tarball for inclusion in node diff --git a/scripts/relocate.sh b/scripts/relocate.sh index b7483f2963aea..ff40f857a679e 100755 --- a/scripts/relocate.sh +++ b/scripts/relocate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Change the cli shebang to point at the specified node # Useful for when the program is moved around after install.