Skip to content

Commit

Permalink
ちょっとわかりやすく
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Nov 6, 2024
1 parent 32a2f2e commit bacf688
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/backend/electron/manager/engineInfoManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
minimumEngineManifestSchema,
} from "@/type/preload";
import { AltPortInfos } from "@/store/type";
import { UnreachableError } from "@/type/utility";
import { loadEnvEngineInfos } from "@/domain/defaultEngine/envEngineInfo";
import { failure, Result, success } from "@/type/result";

Expand Down Expand Up @@ -47,11 +46,10 @@ export class EngineInfoManager {
JSON.parse(fs.readFileSync(manifestPath, { encoding: "utf8" })),
);
} catch (e) {
if (e instanceof Error) {
return failure("manifestParseError", e);
} else {
throw new UnreachableError();
}
return failure(
"manifestParseError",
e instanceof Error ? e : new Error("manifest parse error"),
);
}

const [command, ...args] = shlex.split(manifest.command);
Expand Down

0 comments on commit bacf688

Please sign in to comment.