File tree Expand file tree Collapse file tree 3 files changed +1
-17
lines changed Expand file tree Collapse file tree 3 files changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import {
16
16
logStatistics ,
17
17
logSuccess ,
18
18
logWarn ,
19
- mkdirDirSync ,
20
19
random
21
20
} from './utils'
22
21
@@ -868,7 +867,7 @@ function fileSingleResultHandle(
868
867
detailTargetConfig . storeDir &&
869
868
! fs . existsSync ( detailTargetConfig . storeDir )
870
869
) {
871
- mkdirDirSync ( detailTargetConfig . storeDir )
870
+ fs . mkdirSync ( detailTargetConfig . storeDir , { recursive : true } )
872
871
}
873
872
874
873
const storePath = detailTargetConfig . storeDir ?? __dirname
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import {
14
14
isUndefined ,
15
15
log ,
16
16
logError ,
17
- logNumber ,
18
17
logStart ,
19
18
logStatistics ,
20
19
logSuccess ,
Original file line number Diff line number Diff line change @@ -16,20 +16,6 @@ export function random(max: number, min = 0) {
16
16
return result
17
17
}
18
18
19
- export function mkdirDirSync ( dir : string ) {
20
- const dirSplit = path . resolve ( dir ) . split ( path . sep )
21
-
22
- dirSplit . reduce ( ( prev , item , index ) => {
23
- const currentDir = index !== 0 ? path . join ( prev , item ) : item
24
-
25
- if ( ! fs . existsSync ( currentDir ) ) {
26
- fs . mkdirSync ( currentDir )
27
- }
28
-
29
- return currentDir
30
- } , '' )
31
- }
32
-
33
19
export const log = console . log
34
20
export const logStart = chalk . blueBright
35
21
export const logStatistics = chalk . whiteBright
You can’t perform that action at this time.
0 commit comments