Skip to content

Commit

Permalink
fix: Require at least one space in shebang
Browse files Browse the repository at this point in the history
  • Loading branch information
yeldiRium committed Aug 12, 2022
1 parent 4b25159 commit 4ce8891
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { dirname, relative } = require('path')
const mkdir = require('mkdirp-infer-owner')
const toBatchSyntax = require('./to-batch-syntax')
// eslint-disable-next-line max-len
const shebangExpr = /^#!\s*(?:\/usr\/bin\/env\s*((?:[^ \t=]+=[^ \t=]+\s+)*)(?:-S)?\s*)?([^ \t]+)(.*)$/
const shebangExpr = /^#!\s*(?:\/usr\/bin\/env\s+((?:[^ \t=]+=[^ \t=]+\s+)*)(?:-S)?\s+)?([^ \t]+)(.*)$/

const cmdShimIfExists = (from, to) =>
stat(from).then(() => cmdShim(from, to), () => {})
Expand Down

0 comments on commit 4ce8891

Please sign in to comment.