Skip to content

Commit b109095

Browse files
committed
simpler
1 parent 64b56b8 commit b109095

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/deno-compile-win-error.ts

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
// import { ensureDirSync } from "@std/fs";
1+
import { ensureDirSync } from "@std/fs";
22
import { homedir } from "node:os";
3-
// import * as path from "@std/path";
4-
import { delay } from "@std/async";
3+
import * as path from "@std/path";
54

6-
export async function denoCompileWinError() {
7-
await delay(1);
5+
export function denoCompileWinError() {
86
const home = homedir();
9-
if (home) {
10-
console.log(`This will not be printed when compiled for windows`);
7+
const whereTheProblemsAre = path.join(home, "problematic");
8+
9+
try {
10+
ensureDirSync(whereTheProblemsAre);
11+
12+
throw new Error(
13+
"this will not be logged if compiled\nfor windows on deno v2.1.5",
14+
);
15+
} catch (err) {
16+
console.error(err as Error);
1117
}
1218
}

0 commit comments

Comments
 (0)