Skip to content

Commit

Permalink
more general coffeescript detection
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Mar 28, 2011
1 parent e872224 commit e24cb23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var path = require('path');

// Hack to work when loaded with CoffeeScript
if (process.argv.length < 2
|| !process.argv[0].match(/(?:^|\/)node(?:_g)?(?:-?\d+(?:\.\d+)*)?$/)) {
|| !process.argv[0].match(/(?:^|\/)node(?:[^A-Za-z]|$)/)) {
process.argv = ['coffee', ''].concat(process.argv);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "optimist",
"version" : "0.1.7",
"version" : "0.1.8",
"description" : "Light-weight option parsing with an argv hash. No optstrings attached.",
"main" : "./index.js",
"repository" : {
Expand Down

0 comments on commit e24cb23

Please sign in to comment.