File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,18 @@ const isGitpodEnvironment: boolean = 'GITPOD_WORKSPACE_ID' in process.env;
2929
3030const isVmish : boolean = isDocker || isVm || isGitpodEnvironment ;
3131
32- const isWorker : boolean = isInKubernetes && process . env . NODE_TYPE === "WORKER" ;
33- const isMaster : boolean = isInKubernetes && process . env . NODE_TYPE === "MASTER" ;
32+ function _isMaster ( ) {
33+ const args = process . argv ;
34+ return args . includes ( '--master' )
35+ }
36+
37+ function _isWorker ( ) {
38+ const args = process . argv ;
39+ return args . includes ( '--worker' )
40+ }
41+
42+ const isWorker : boolean = _isWorker ( ) ;
43+ const isMaster : boolean = _isMaster ( ) ;
3444
3545const IS_VM_OR_DOCKER = isDocker || isVm ;
3646const IS_PRODUCTION = process . env . ENV === "production" ;
Original file line number Diff line number Diff line change @@ -15,4 +15,4 @@ const isMaster: boolean = _isMaster();
1515const isDev : boolean =
1616 process . env . NODE_ENV === 'development' || process . env . DEBUG_PROD === 'true' ;
1717
18- export { isInKubernetes , isWorker , isMaster , isDev } ;
18+ export { isInKubernetes , isWorker , isMaster , isDev } ;
You can’t perform that action at this time.
0 commit comments