Permalink
Browse files

Fix #1994 Allow spaces in #! lines

  • Loading branch information...
1 parent b0c8ab4 commit d1a8ca9ade73fb5469509d4cd574c612f115fa28 @isaacs isaacs committed Jan 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/utils/cmd-shim.js
View
@@ -20,7 +20,7 @@ var fs = require("graceful-fs")
, path = require("path")
, relativize = require("./relativize.js")
, npm = require("../npm.js")
- , shebangExpr = /^#\!(?:\/usr\/bin\/env )?([^ \t]+)(.*)$/
+ , shebangExpr = /^#\!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/
function cmdShimIfExists (from, to, cb) {
fs.stat(from, function (er) {

0 comments on commit d1a8ca9

Please sign in to comment.