mirror of
https://github.com/Azure/setup-helm.git
synced 2026-07-08 01:11:38 +00:00
a517f2ff65
Co-authored-by: taakleton <taakleton@users.noreply.github.com>
9 lines
330 B
JavaScript
9 lines
330 B
JavaScript
'use strict';
|
|
|
|
module.exports = (flag, argv = process.argv) => {
|
|
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
const position = argv.indexOf(prefix + flag);
|
|
const terminatorPosition = argv.indexOf('--');
|
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
};
|