Skip to content

Commit 0c7682d

Browse files
committed
only commit changes in dirty git repo
1 parent 7f13df0 commit 0c7682d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

integrations/upgrade/index.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { isRepoDirty } from '../../packages/@tailwindcss-upgrade/src/utils/git'
12
import { candidate, css, html, js, json, test, ts } from '../utils'
23

34
test(
@@ -2848,8 +2849,10 @@ test(
28482849
`)
28492850
28502851
// Commit the changes
2851-
await exec('git add .')
2852-
await exec('git commit -m "upgrade"')
2852+
if (isRepoDirty()) {
2853+
await exec('git add .')
2854+
await exec('git commit -m "upgrade"')
2855+
}
28532856
28542857
// Run the upgrade again
28552858
let output = await exec('npx @tailwindcss/upgrade')

0 commit comments

Comments
 (0)