Last change
on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
436 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | function getProcessArgvBinIndex() {
|
---|
| 2 | if (isBundledElectronApp())
|
---|
| 3 | return 0;
|
---|
| 4 | return 1;
|
---|
| 5 | }
|
---|
| 6 | function isBundledElectronApp() {
|
---|
| 7 | return isElectronApp() && !process.defaultApp;
|
---|
| 8 | }
|
---|
| 9 | function isElectronApp() {
|
---|
| 10 | return !!process.versions.electron;
|
---|
| 11 | }
|
---|
| 12 | export function hideBin(argv) {
|
---|
| 13 | return argv.slice(getProcessArgvBinIndex() + 1);
|
---|
| 14 | }
|
---|
| 15 | export function getProcessArgvBin() {
|
---|
| 16 | return process.argv[getProcessArgvBinIndex()];
|
---|
| 17 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.