mirror of
https://github.com/actions/setup-python.git
synced 2025-06-13 15:57:13 +02:00
Initial pass
This commit is contained in:
8
node_modules/has-flag/index.js
generated
vendored
Normal file
8
node_modules/has-flag/index.js
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
module.exports = (flag, argv) => {
|
||||
argv = argv || process.argv;
|
||||
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
||||
const pos = argv.indexOf(prefix + flag);
|
||||
const terminatorPos = argv.indexOf('--');
|
||||
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
||||
};
|
Reference in New Issue
Block a user