mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
[Base] Force rm clone dir if exists
This commit is contained in:
parent
32eebc02b3
commit
3487624ac0
1 changed files with 3 additions and 1 deletions
|
@ -6,7 +6,7 @@ import Parcel from 'parcel-bundler';
|
|||
import axios from 'axios';
|
||||
import glob from 'glob';
|
||||
|
||||
import { rmSync, mkdirSync, readFileSync, writeFileSync, copyFileSync, existsSync } from 'fs';
|
||||
import { rmSync, mkdirSync, readFileSync, writeFileSync, copyFileSync, existsSync, rmdirSync } from 'fs';
|
||||
import { createHash } from 'crypto';
|
||||
|
||||
import { dirname } from 'path';
|
||||
|
@ -129,6 +129,8 @@ for (const parentRepo of ModuleRepos) {
|
|||
|
||||
// resetDir(cloneDir);
|
||||
// rmSync(cloneDir, { recursive: true, force: true });
|
||||
|
||||
if (existsSync(cloneDir)) rmSync(cloneDir, { recursive: true, force: true });
|
||||
|
||||
await new Promise((res) => exec(`git clone ${url} ${cloneDir}`, res));
|
||||
|
||||
|
|
Loading…
Reference in a new issue