Skip to content

Commit 44de7a8

Browse files
committed
chore: get rid of type/lint errors
1 parent a74dad4 commit 44de7a8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/cargo-msfs.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { $ } from "bun";
2-
import { existsSync, mkdirSync, readFileSync, rmdirSync } from "node:fs";
3-
import { resolve, normalize, join, dirname } from "node:path";
2+
import { existsSync, mkdirSync, rmdirSync, readFileSync } from "node:fs";
3+
import { dirname, join, normalize, resolve } from "node:path";
44

55
/// The type returned from the `cargo-msfs info -f` command
66
interface InstalledSdkVersions {
@@ -18,8 +18,10 @@ function findWorkspaceRoot() {
1818
do {
1919
// Try reading a package.json in this directory
2020
const packageJson = join(current, "package.json");
21+
2122
if (existsSync(packageJson)) {
22-
const manifest = JSON.parse(readFileSync(packageJson, "utf8"));
23+
const manifest = JSON.parse(readFileSync(packageJson, "utf-8")) as { workspaces?: string[] };
24+
2325
// Check if there is workspaces, meaning this is root
2426
if (manifest.workspaces) {
2527
return current;
@@ -101,7 +103,7 @@ async function main() {
101103
-w /workspace${relativeWorkdDir} \
102104
${IMAGE_NAME} \
103105
bash -c "cargo-msfs build ${version} -i ./src/wasm -o ./${relativeSimDir}/msfs_navigation_data_interface.wasm"`.catch(
104-
err => process.exit(err.exitCode ?? 1),
106+
(err: { exitCode?: number }) => process.exit(err.exitCode ?? 1),
105107
);
106108
}
107109
}

0 commit comments

Comments
 (0)