@@ -91,7 +91,16 @@ if (currentBranch !== branch) {
9191 ) ;
9292}
9393
94- const status = run ( "git" , [ "status" , "--porcelain" ] , { capture : true } ) ;
94+ // `-c core.fileMode=false` so executable-bit flips don't show up here. esbuild
95+ // emits dist/bin/*.js at mode 100644 on Linux, but those files were originally
96+ // committed at 100755 (and macOS preserves that on rebuild), so a CI rebuild
97+ // would otherwise look like a "dirty worktree" or "validation changed files"
98+ // even when no content changed.
99+ const status = run (
100+ "git" ,
101+ [ "-c" , "core.fileMode=false" , "status" , "--porcelain" ] ,
102+ { capture : true } ,
103+ ) ;
95104if ( status ) {
96105 throw new Error ( `Refusing to release with a dirty worktree:\n${ status } ` ) ;
97106}
@@ -143,9 +152,11 @@ if (!skipValidation) {
143152 "src/commands/python3/python3.optin.test.ts" ,
144153 ] ) ;
145154
146- const postValidationStatus = run ( "git" , [ "status" , "--porcelain" ] , {
147- capture : true ,
148- } ) ;
155+ const postValidationStatus = run (
156+ "git" ,
157+ [ "-c" , "core.fileMode=false" , "status" , "--porcelain" ] ,
158+ { capture : true } ,
159+ ) ;
149160 if ( postValidationStatus ) {
150161 throw new Error (
151162 `Validation changed files. Commit the build output first, then rerun:\n${ postValidationStatus } ` ,
0 commit comments