diff options
| author | Axetroy <troy450409405@gmail.com> | 2019-05-15 03:11:57 +0800 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-05-14 15:11:57 -0400 |
| commit | a3de8c3d8a376049a37f8193c8538acc0d7a88f3 (patch) | |
| tree | 9b928d1daa2f0d039cc50046b52f47c47ba18626 | |
| parent | 9c852cdfd28da06763e14dcd5b2fac1b8fd9b9bf (diff) | |
fs: Remove completed todo item (denoland/deno_std#406)
Original: https://github.com/denoland/deno_std/commit/d097e319e84b1155f2406e7d49fdf68a8d6ee161
| -rw-r--r-- | fs/ensure_symlink.ts | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/fs/ensure_symlink.ts b/fs/ensure_symlink.ts index 09452a8ce..9b7cc429c 100644 --- a/fs/ensure_symlink.ts +++ b/fs/ensure_symlink.ts @@ -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. @@ -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); } /** @@ -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); } |
