Simplify mkdirP implementation (#781)

Co-authored-by: Linus Unnebäck <linus@folkdatorn.se>
This commit is contained in:
Thomas Boop
2021-04-28 14:38:41 -04:00
committed by GitHub
parent dd046652c3
commit 15fef78171
3 changed files with 3 additions and 74 deletions

View File

@@ -1,3 +1,4 @@
import {ok} from 'assert'
import * as childProcess from 'child_process'
import * as path from 'path'
import {promisify} from 'util'
@@ -161,7 +162,8 @@ export async function rmRF(inputPath: string): Promise<void> {
* @returns Promise<void>
*/
export async function mkdirP(fsPath: string): Promise<void> {
await ioUtil.mkdirP(fsPath)
ok(fsPath, 'a path argument must be provided')
await ioUtil.mkdir(fsPath, {recursive: true})
}
/**