Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Explicitly require bash rather than sh #67

Closed
wants to merge 1 commit into from

3 participants

@mbrevoort

I ran into a bug on a SmartOS vm. I get this error when trying to invoke n because apparently local is not defined in sh on SmartOS:

$n
/home/node/local/nodejs/bin/node
/home/node/local/bin/n[116]: local: not found [No such file or directory]
/home/node/local/bin/n[117]: local: not found [No such file or directory]

Here are the versions of each.

$ sh --version
  version         sh (AT&T Research) 93t+ 2010-03-05

$ bash --version
GNU bash, version 4.1.0(1)-release (i386-pc-solaris2.11)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I changed the shell script header to require bash rather than the more ambiguous sh.

@Raynos

+1

@tj tj closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 13, 2012
  1. @mbrevoort
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  bin/n
View
2  bin/n
@@ -1,4 +1,4 @@
-#!/usr/bin/env sh
+#!/usr/bin/env bash
# Library version
Something went wrong with that request. Please try again.