aboutsummaryrefslogtreecommitdiff
path: root/node_modules/yargs/build/lib/utils/process-argv.js
blob: 74dc9e4c451d0503ec91fd578429887f96f5a449 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function getProcessArgvBinIndex() {
    if (isBundledElectronApp())
        return 0;
    return 1;
}
function isBundledElectronApp() {
    return isElectronApp() && !process.defaultApp;
}
function isElectronApp() {
    return !!process.versions.electron;
}
export function hideBin(argv) {
    return argv.slice(getProcessArgvBinIndex() + 1);
}
export function getProcessArgvBin() {
    return process.argv[getProcessArgvBinIndex()];
}