Skip to content

Commit

Permalink
chore: catch script errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jan 26, 2025
1 parent 1bc47b7 commit c3fa395
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion scripts/bench-file/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as fs from 'node:fs'
import * as path from 'node:path'
import { createVitest } from 'vitest/node'

main()
main().catch(console.error)

async function main() {
const reports: BenchmarkReport[] = []
Expand Down
2 changes: 1 addition & 1 deletion scripts/bench-main/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { execa } from 'execa'
import { existsSync } from 'node:fs'
import { supabase } from 'radashi-db/supabase.ts'

main()
main().catch(console.error)

async function main() {
// Get the last benched SHA
Expand Down
2 changes: 1 addition & 1 deletion scripts/bench-pr/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { benchChangedFiles } from '@radashi-org/benchmarks/benchChangedFiles.ts'
import { verifyEnvVars } from '@radashi-org/common/verifyEnvVars.ts'
import { execa } from 'execa'

main()
main().catch(console.error)

async function main() {
const { radashiBotToken } = verifyEnvVars({
Expand Down
2 changes: 1 addition & 1 deletion scripts/bundle-impact/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { weighChangedFunctions } from './weigh-changed.ts'

main()
main().catch(console.error)

async function main() {
if (process.env.CI) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/checkout-pr/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { verifyEnvVars } from '@radashi-org/common/verifyEnvVars.ts'
import { checkoutPullRequest } from './checkout-pr.ts'

main()
main().catch(console.error)

async function main() {
const { repoUrl, headRef } = verifyEnvVars({
Expand Down
2 changes: 1 addition & 1 deletion scripts/format/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { execa } from 'execa'
import { glob } from 'tinyglobby'

main()
main().catch(console.error)

async function main() {
// 1. Remember if the user has uncommitted changes (ignoring untracked files).
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const lint = (scripts: string[]): Command[] => [
},
]

main()
main().catch(console.error)

async function main() {
const argv = mri(process.argv.slice(2), {
Expand Down
2 changes: 1 addition & 1 deletion scripts/prerelease-pr/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { verifyEnvVars } from '@radashi-org/common/verifyEnvVars.ts'

main()
main().catch(console.error)

async function main() {
const args = verifyEnvVars({
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-docs/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import os from 'node:os'
import path from 'node:path'
import { supabase } from 'radashi-db/supabase.ts'

main()
main().catch(console.error)

async function main() {
const argv = mri(process.argv.slice(2), {
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-version/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { verifyEnvVars } from '@radashi-org/common/verifyEnvVars.ts'

main()
main().catch(console.error)

async function main() {
const args = await parseArgs()
Expand Down
2 changes: 1 addition & 1 deletion scripts/register-pr/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { verifyEnvVars } from '@radashi-org/common/verifyEnvVars.ts'
import fs from 'node:fs/promises'
import { registerPullRequest } from './register-pr.ts'

main()
main().catch(console.error)

async function main() {
const { githubToken, prPayload } = verifyEnvVars({
Expand Down
2 changes: 1 addition & 1 deletion scripts/release-notes/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import mri from 'mri'

main()
main().catch(console.error)

async function main() {
const argv = mri(process.argv.slice(2))
Expand Down
2 changes: 1 addition & 1 deletion scripts/seed-benchmarks/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { existsSync } from 'node:fs'
import { supabase } from 'radashi-db/supabase.ts'
import { glob } from 'tinyglobby'

main()
main().catch(console.error)

async function main() {
const currentSha = await execa('git', ['rev-parse', 'HEAD']).then(
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-branch/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { readFile } from 'node:fs/promises'
import path from 'node:path'
import { glob } from 'tinyglobby'

main()
main().catch(console.error)

async function main() {
const changedFiles = await getChangedFiles()
Expand Down
2 changes: 1 addition & 1 deletion scripts/test-single/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execa, ExecaError } from 'execa'

main()
main().catch(console.error)

async function main() {
const [funcName] = process.argv.slice(2)
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-browserslist/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { dequal } from 'dequal'
import { execa } from 'execa'
import fs from 'node:fs'

main()
main().catch(console.error)

async function main() {
// Check for uncommitted changes
Expand Down

0 comments on commit c3fa395

Please sign in to comment.