File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,18 @@ const logger: winston.Logger = winston.createLogger({
32
32
] ,
33
33
} ) ;
34
34
35
+ const makeid = ( length : number ) : string => {
36
+ let result = "" ;
37
+ const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" ;
38
+ const charactersLength = characters . length ;
39
+ for ( let i = 0 ; i < length ; i = i + 1 ) {
40
+ result += characters . charAt ( Math . floor ( Math . random ( ) * charactersLength ) ) ;
41
+ }
42
+
43
+ return result ;
44
+ } ;
45
+ process . env . CI_PIPELINE_ID = makeid ( 10 ) ;
46
+
35
47
const argv = yargs . argv ;
36
48
const cwd = argv . cwd || process . cwd ( ) ;
37
49
Original file line number Diff line number Diff line change 1
1
import * as c from "ansi-colors" ;
2
2
import * as deepExtend from "deep-extend" ;
3
+ import * as glob from "glob" ;
3
4
import * as prettyHrtime from "pretty-hrtime" ;
4
5
import * as shelljs from "shelljs" ;
5
6
6
- const shell = process . env . EXEPATH ? `${ process . env . EXEPATH } /bash.exe` : "/bin/bash" ;
7
+ let shell = "/bin/bash" ;
8
+ if ( process . env . EXEPATH ) {
9
+ const bashExes = glob . sync ( `${ process . env . EXEPATH } /**/bash.exe` ) ;
10
+ if ( bashExes . length === 0 ) {
11
+ console . error ( `${ c . red ( "Could not find any bash executables" ) } ` ) ;
12
+ process . exit ( 1 ) ;
13
+ }
14
+ shell = bashExes [ 0 ] ;
15
+ }
7
16
8
17
export class Job {
9
18
public readonly name : string ;
Original file line number Diff line number Diff line change 5
5
],
6
6
"jsRules" : {},
7
7
"rules" : {
8
+ "no-magic-numbers" : false ,
8
9
"strict-boolean-expressions" : false ,
9
10
"newline-per-chained-call" : false ,
10
11
"no-any" : false ,
You can’t perform that action at this time.
0 commit comments