From a7474eb272c20ce84e025559e6b858a5b4bacd5f Mon Sep 17 00:00:00 2001 From: axetroy Date: Wed, 15 May 2019 01:16:27 +0800 Subject: [PATCH 1/2] remove completed todo item --- fs/ensure_symlink.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/fs/ensure_symlink.ts b/fs/ensure_symlink.ts index 09452a8ceaa0..0f200f380bac 100644 --- a/fs/ensure_symlink.ts +++ b/fs/ensure_symlink.ts @@ -30,12 +30,7 @@ export async function ensureSymlink(src: string, dest: string): Promise { 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 +57,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); } From 40ccbb5130741d59ccae5392afea11ef8bcc1565 Mon Sep 17 00:00:00 2001 From: axetroy Date: Wed, 15 May 2019 01:18:20 +0800 Subject: [PATCH 2/2] remove unused code --- fs/ensure_symlink.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/ensure_symlink.ts b/fs/ensure_symlink.ts index 0f200f380bac..9b7cc429c721 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.