Skip to content

Commit 561e803

Browse files
authored
Use sh instead of bash (#389)
Currently bash is used to run some pretty trivial commands, but these commands don't require anything bash-specific and can run with a regular POSIX shell. Use sh instead, to remove bash as a dependency for this package. There is no need to update the list of dependencies since bash was already missing from this list.
1 parent a6199d6 commit 561e803

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ There are several alternatives that create isolated environments:
362362
Nave stores all environments in one directory ``~/.nave``. Can create
363363
per node version environments using `nave use envname versionname`.
364364
Can not pass additional arguments into configure (for example --without-ssl)
365-
Can't run on windows because it relies on bash.
365+
Can't run on windows because it relies on a POSIX shell.
366366

367367
* `nvm <https://github.com/creationix/nvm/blob/master/nvm.sh>`_ - Node Version
368368
Manager. It is necessarily to do `nvm sync` for caching available node.js

nodeenv.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,7 @@ def install_npm(env_dir, _src_dir, args):
816816
)
817817
proc = subprocess.Popen(
818818
(
819-
'bash', '-c',
819+
'sh', '-c',
820820
'. {0} && npm install -g npm@{1}'.format(
821821
_quote(join(env_dir, 'bin', 'activate')),
822822
args.npm,
@@ -1179,7 +1179,7 @@ def main():
11791179
""",
11801180
}
11811181

1182-
SHIM = """#!/usr/bin/env bash
1182+
SHIM = """#!/usr/bin/env sh
11831183
export NODE_PATH='__NODE_VIRTUAL_ENV__/lib/node_modules'
11841184
export NPM_CONFIG_PREFIX='__NODE_VIRTUAL_ENV__'
11851185
export npm_config_prefix='__NODE_VIRTUAL_ENV__'
@@ -1281,7 +1281,7 @@ def main():
12811281

12821282
ACTIVATE_SH = r"""
12831283
1284-
# This file must be used with "source bin/activate" *from bash*
1284+
# This file must be used with "source bin/activate" *from sh*
12851285
# you cannot run it directly
12861286
12871287
deactivate_node () {

0 commit comments

Comments
 (0)