Skip to content

Commit 9effe9b

Browse files
committed
fix: detect from cwd by default
1 parent 664b0bc commit 9effe9b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bin/detect-node-support

+6-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Options:
2929
`;
3030
};
3131

32-
exports.main = async ({ _: [what], deps, deep, dev, json }) => {
32+
exports.main = async ({ _: [what], help, deps, deep, dev, json }) => {
3333

3434
const enabledLogs = ['detect-node-support:warn:*', 'detect-node-support:error:*'];
3535

@@ -39,11 +39,15 @@ exports.main = async ({ _: [what], deps, deep, dev, json }) => {
3939

4040
Debug.enable(enabledLogs.join(','));
4141

42-
if (!what) {
42+
if (help) {
4343
console.log(internals.help());
4444
return;
4545
}
4646

47+
if (!what) {
48+
what = process.cwd();
49+
}
50+
4751
if (!deps && (deep || dev)) {
4852
console.log('--deep and --dev can only be used together with --deps\n');
4953
console.log(internals.help());

0 commit comments

Comments
 (0)