Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support environments without process.argv #44

Merged
merged 1 commit into from Jul 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Support environments without process.argv
like Edge Runtime
  • Loading branch information
copini committed Jul 6, 2023
commit 898a02cbf94004e91c0c064c65322a8559146c66
2 changes: 1 addition & 1 deletion lib/system/has-flag.js
Expand Up @@ -25,7 +25,7 @@ SOFTWARE.
'use strict';

module.exports = function(flag, argv) {
argv = argv || process.argv;
argv = argv || process.argv || [];

var terminatorPos = argv.indexOf('--');
var prefix = /^-{1,2}/.test(flag) ? '' : '--';
Expand Down