Skip to content

Commit

Permalink
fs: Remove completed todo item (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy authored and ry committed May 14, 2019
1 parent 49ae943 commit d097e31
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions fs/ensure_symlink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { ensureDir, ensureDirSync } from "./ensure_dir.ts";
import { exists, existsSync } from "./exists.ts";
import { getFileInfoType } from "./utils.ts";

const isWindows = Deno.platform.os === "win";

/**
* Ensures that the link exists.
* If the directory structure does not exist, it is created.
Expand All @@ -30,12 +28,7 @@ export async function ensureSymlink(src: string, dest: string): Promise<void> {

await ensureDir(path.dirname(dest));

// TODO(axetroy): remove this if condition. refs: https://github.com/denoland/deno/issues/2169
if (isWindows) {
await Deno.symlink(src, dest, srcFilePathType || undefined);
} else {
await Deno.symlink(src, dest);
}
await Deno.symlink(src, dest, srcFilePathType);
}

/**
Expand All @@ -62,10 +55,5 @@ export function ensureSymlinkSync(src: string, dest: string): void {

ensureDirSync(path.dirname(dest));

// TODO(axetroy): remove this if condition. refs: https://github.com/denoland/deno/issues/2169
if (isWindows) {
Deno.symlinkSync(src, dest, srcFilePathType || undefined);
} else {
Deno.symlinkSync(src, dest);
}
Deno.symlinkSync(src, dest, srcFilePathType);
}

0 comments on commit d097e31

Please sign in to comment.