File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ function isDirectory(path: string) {
21
21
return statSync ( path ) . isDirectory ( )
22
22
}
23
23
24
- // async function hasPendingGitChanges() {
25
- // const status = await execaSync('git', ['status', '--porcelain'])
26
- // return status.stdout.length > 0
27
- // }
24
+ async function hasPendingGitChanges ( ) {
25
+ const status = await execaSync ( 'git' , [ 'status' , '--porcelain' ] )
26
+ return status . stdout . length > 0
27
+ }
28
28
29
29
async function createOptions (
30
30
json : PersistedOptions ,
@@ -75,13 +75,13 @@ export async function addToApp(
75
75
environment . intro ( `Adding ${ addOns . join ( ', ' ) } to the project...` )
76
76
}
77
77
78
- // if (await hasPendingGitChanges()) {
79
- // environment.error(
80
- // 'You have pending git changes.',
81
- // 'Please commit or stash them before adding add-ons.',
82
- // )
83
- // return
84
- // }
78
+ if ( await hasPendingGitChanges ( ) ) {
79
+ environment . error (
80
+ 'You have pending git changes.' ,
81
+ 'Please commit or stash them before adding add-ons.' ,
82
+ )
83
+ return
84
+ }
85
85
86
86
const newOptions = await createOptions ( persistedOptions , addOns )
87
87
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { register as registerReactCra } from '@tanstack/cta-framework-react-cra'
6
6
import { register as registerSolid } from '@tanstack/cta-framework-solid'
7
7
8
8
import {
9
- addToApp ,
9
+ // addToApp,
10
10
createApp ,
11
11
createAppOptionsFromPersisted ,
12
12
createDefaultEnvironment ,
You can’t perform that action at this time.
0 commit comments