Skip to content

Commit f246422

Browse files
committed
move into main function
1 parent 54ae361 commit f246422

File tree

3 files changed

+30
-20
lines changed

3 files changed

+30
-20
lines changed

packages/amazonq/scripts/build/copyFiles.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,14 @@ if (args.includes('--vueHr')) {
9494
console.log('Using Vue Hot Reload webpacks from core/')
9595
}
9696

97-
try {
98-
tasks.map(copy)
99-
} catch (error) {
100-
console.error('`copyFiles.ts` failed')
101-
console.error(error)
102-
process.exit(1)
97+
function main() {
98+
try {
99+
tasks.map(copy)
100+
} catch (error) {
101+
console.error('`copyFiles.ts` failed')
102+
console.error(error)
103+
process.exit(1)
104+
}
103105
}
106+
107+
void main()

packages/core/scripts/build/copyFiles.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,14 @@ function copy(task: CopyTask): void {
6060
throw new Error(`Copy "${src}" to "${dst}" failed: ${error instanceof Error ? error.message : error}`)
6161
}
6262
}
63-
64-
try {
65-
tasks.map(copy)
66-
} catch (error) {
67-
console.error('`copyFiles.ts` failed')
68-
console.error(error)
69-
process.exit(1)
63+
function main() {
64+
try {
65+
tasks.map(copy)
66+
} catch (error) {
67+
console.error('`copyFiles.ts` failed')
68+
console.error(error)
69+
process.exit(1)
70+
}
7071
}
72+
73+
void main()

packages/toolkit/scripts/build/copyFiles.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,14 @@ function copy(task: CopyTask): void {
114114
throw new Error(`Copy "${src}" to "${dst}" failed: ${error instanceof Error ? error.message : error}`)
115115
}
116116
}
117-
118-
try {
119-
tasks.map(copy)
120-
} catch (error) {
121-
console.error('`copyFiles.ts` failed')
122-
console.error(error)
123-
process.exit(1)
117+
function main() {
118+
try {
119+
tasks.map(copy)
120+
} catch (error) {
121+
console.error('`copyFiles.ts` failed')
122+
console.error(error)
123+
process.exit(1)
124+
}
124125
}
126+
127+
void main()

0 commit comments

Comments
 (0)