File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,23 @@ function sync_args_from_cmd(args) {
322
322
} else {
323
323
lt_config [ "run_settings" ] [ "reject_unauthorized" ] = false ;
324
324
}
325
+
326
+ //Set the env variables
327
+ let sys_env_vars = undefined ;
328
+ if ( "sys-envs" in args ) {
329
+ sys_env_vars = args [ "sys-envs" ] . split ( "," ) ;
330
+ } else if ( lt_config [ "run_settings" ] [ "sys-envs" ] ) {
331
+ sys_env_vars = lt_config [ "run_settings" ] [ "sys-envs" ] . split ( "," ) ;
332
+ }
333
+
334
+ if ( sys_env_vars ) {
335
+ let envs = { } ;
336
+ for ( env in sys_env_vars ) {
337
+ envs [ sys_env_vars [ env ] . split ( "=" ) [ 0 ] ] = sys_env_vars [ env ] . split ( "=" ) [ 1 ] ;
338
+ }
339
+ lt_config [ "run_settings" ] [ "sys-envs" ] = envs ;
340
+ }
341
+
325
342
//get specs from current directory if specs are not passed in config or cli
326
343
if (
327
344
( lt_config [ "run_settings" ] [ "specs" ] == undefined ||
Original file line number Diff line number Diff line change @@ -127,6 +127,11 @@ const argv = require("yargs")
127
127
alias : "build-tags" ,
128
128
describe : "build tags" ,
129
129
type : "string" ,
130
+ } )
131
+ . option ( "sys-envs" , {
132
+ alias : "sys-env-variables" ,
133
+ describe : "system environment variables" ,
134
+ type : "string" ,
130
135
} ) ;
131
136
} ,
132
137
function ( argv ) {
You can’t perform that action at this time.
0 commit comments