Skip to content

Commit 430fafc

Browse files
author
James Halliday
committed
argv._ fixed by fixing the coffee detection
1 parent 343b8af commit 430fafc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = Argv;
22
var path = require('path');
33

44
// Hack to work when loaded with CoffeeScript
5-
if (process.argv.length < 2 || process.argv[0] != 'node') {
5+
if (process.argv.length < 2 || !process.argv[0].match(/(?:^|\/)node$/)) {
66
process.argv = ['coffee', ''].concat(process.argv);
77
}
88

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name" : "optimist",
3-
"version" : "0.1.4",
3+
"version" : "0.1.5",
44
"description" : "Light-weight option parsing with an argv hash. No optstrings attached.",
55
"main" : "./index.js",
66
"repository" : {

test/_.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ exports.whichNodeArgs = function () {
4444
function testCmd (cmd, args) {
4545
var to = setTimeout(function () {
4646
assert.fail('Never got stdout data.')
47-
}, 1000);
47+
}, 5000);
4848

4949
var oldDir = process.cwd();
5050
process.chdir(__dirname + '/_');
@@ -63,4 +63,4 @@ function testCmd (cmd, args) {
6363
var _ = JSON.parse(buf.toString());
6464
assert.eql(_.map(String), args.map(String));
6565
});
66-
};
66+
}

0 commit comments

Comments
 (0)