Skip to content

Commit cf80358

Browse files
committed
fix: Remove --unsafe flag from Biome format command and improve error type handling.
1 parent fdc6d6c commit cf80358

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/scripts/biome-gs.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async function main() {
8989

9090
// 2. Run Biome
9191
const biomeArgs =
92-
command === "format" ? "check --write --unsafe ." : "check .";
92+
command === "format" ? "check --write ." : "check .";
9393
console.log(`Running biome ${biomeArgs}...`);
9494
try {
9595
const { stdout, stderr } = await execAsync(
@@ -98,9 +98,10 @@ async function main() {
9898
);
9999
if (stdout) console.log(stdout.replace(/\.gs\.js/g, ".gs"));
100100
if (stderr) console.error(stderr.replace(/\.gs\.js/g, ".gs"));
101-
} catch (e: any) {
102-
if (e.stdout) console.log(e.stdout.replace(/\.gs\.js/g, ".gs"));
103-
if (e.stderr) console.error(e.stderr.replace(/\.gs\.js/g, ".gs"));
101+
} catch (e: unknown) {
102+
const err = e as { stdout?: string; stderr?: string };
103+
if (err.stdout) console.log(err.stdout.replace(/\.gs\.js/g, ".gs"));
104+
if (err.stderr) console.error(err.stderr.replace(/\.gs\.js/g, ".gs"));
104105
// Don't exit yet, we need to restore files
105106
}
106107
} catch (err) {

0 commit comments

Comments
 (0)