Skip to content

Commit 494d9be

Browse files
committed
🔧chore(core): 移除执行execa处的捕获异常
1 parent 66ec52b commit 494d9be

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

scripts/lint-script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { execCommand, loggerWarring } from "@/shared";
55
async function lint() {
66
try {
77
await prettierFormat(["./src/", "./scripts/"]);
8-
await execCommand("git", ["add", ","]);
8+
await execCommand("git", ["add", "."]);
99
await eslintFix(["./src/", "./scripts/"]);
1010
} catch (error) {
1111
loggerWarring(error);

src/shared/index.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ export const execCommand = async (
1414
args: string[],
1515
options?: Options,
1616
) => {
17-
try {
18-
const res = await execa(cmd, args, options);
19-
return res?.stdout?.trim() || "";
20-
} catch (error: unknown) {
21-
loggerError(error);
22-
}
17+
const res = await execa(cmd, args, options);
18+
return res?.stdout?.trim() || "";
2319
};
2420

2521
export class PrettyError extends Error {

0 commit comments

Comments
 (0)