Skip to content

Commit 5767a47

Browse files
committed
Fix lint-error
1 parent edc77b7 commit 5767a47

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/git.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@ const hasCleanIndex = (filePath: string): boolean => {
6262
resolve(filePath),
6363
];
6464

65-
let result = true;
6665
try {
67-
child_process.execFileSync(COMMAND, args, OPTIONS).toString();
66+
child_process.execFileSync(COMMAND, args, OPTIONS);
6867
} catch (err: unknown) {
69-
result = false;
68+
return false;
7069
}
7170

72-
return result;
71+
return true;
7372
};
7473

7574
const fetchFromOrigin = (branch: string) => {
@@ -80,9 +79,7 @@ const fetchFromOrigin = (branch: string) => {
8079
branch,
8180
];
8281

83-
try {
84-
child_process.execFileSync(COMMAND, args, OPTIONS).toString();
85-
} catch (err: unknown) {}
82+
child_process.execFileSync(COMMAND, args, OPTIONS);
8683
};
8784

8885
const getUntrackedFileList = (staged = false): string[] => {

0 commit comments

Comments
 (0)