Skip to content

Commit

Permalink
Syntax fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmk committed Nov 15, 2023
1 parent c1a6df6 commit e27d198
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/helpers/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ export interface JSZ {

function pathNorm(path: string): string {
// win32 apis always work with forward slash
return path.replaceAll("\\", "/").trimEnd("/");
return path.replaceAll("\\", "/");
}

function getTmpFolder() {
let tmpDir = Deno.env.get("TMPDIR");
if (!tmpDir) {
// Unix or Windows home
const home = pathNorm(Deno.env.get("HOME") || Deno.env.get("USERPROFILE"));
tmpDir = `${home}/tmp`;
const home = Deno.env.get("HOME") || Deno.env.get("USERPROFILE") || "/tmp";
tmpDir = pathNorm(`${home}/tmp`);
}
const tmp = pathNorm(`${tmpDir}/nats_launcher`);
Deno.mkdirSync(tmp, { recursive: true });
Expand Down

0 comments on commit e27d198

Please sign in to comment.