Skip to content

Commit d20902f

Browse files
committed
only commit changes in dirty git repo
1 parent aadc926 commit d20902f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

integrations/upgrade/index.test.ts

+5-2
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)