File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ async function installDependencies(dirName) {
39
39
40
40
async function initGit ( dirName ) {
41
41
console . log ( `Setting up Git ...` ) ;
42
- await fs . removeSync ( `${ dirName } /.git` ) ;
42
+ fs . removeSync ( `${ dirName } /.git` ) ;
43
43
await run ( `cd ${ dirName } && git init && git add . && git commit -m "New Stackbit project"` ) ;
44
44
}
45
45
/**
@@ -148,17 +148,17 @@ async function cloneExample() {
148
148
// Checkout just the example dir.
149
149
await run ( `cd ${ tmpDir } && git sparse-checkout set ${ args . example } ` ) ;
150
150
// move out into a new directory.
151
- await fs . moveSync ( `${ tmpDir } /${ args . example } ` , dirName ) ;
151
+ fs . moveSync ( `${ tmpDir } /${ args . example } ` , dirName ) ;
152
152
// Delete the clone.
153
- await fs . removeSync ( tmpDir ) ;
153
+ fs . removeSync ( tmpDir ) ;
154
154
155
155
// Project Setup
156
156
await installDependencies ( dirName ) ;
157
157
await initGit ( dirName ) ;
158
158
} catch ( err ) {
159
159
console . error ( err ) ;
160
- if ( fs . existsSync ( dirName ) ) await fs . removeSync ( dirName ) ;
161
- if ( fs . existsSync ( tmpDir ) ) await fs . removeSync ( tmpDir ) ;
160
+ if ( fs . existsSync ( dirName ) ) fs . removeSync ( dirName ) ;
161
+ if ( fs . existsSync ( tmpDir ) ) fs . removeSync ( tmpDir ) ;
162
162
process . exit ( 1 ) ;
163
163
}
164
164
You can’t perform that action at this time.
0 commit comments