summaryrefslogtreecommitdiff
path: root/fs/ensure_symlink.ts
diff options
context:
space:
mode:
authorAxetroy <axetroy.dev@gmail.com>2019-04-24 05:42:02 +0800
committerRyan Dahl <ry@tinyclouds.org>2019-04-23 17:42:02 -0400
commit0fb83ba0d2e8facfa32e92a4d0700caad83701d9 (patch)
tree038510b68f62ec2f53bb7c52177c689ea63e043f /fs/ensure_symlink.ts
parentbbdd51574c31c5c415176208187bc884ccaae3c6 (diff)
fs utils getFileInfoType() return undefined when not found (denoland/deno_std#341)
Original: https://github.com/denoland/deno_std/commit/0a6180016383b9d527bb96556ae0bcdabe5161eb
Diffstat (limited to 'fs/ensure_symlink.ts')
-rw-r--r--fs/ensure_symlink.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ensure_symlink.ts b/fs/ensure_symlink.ts
index fbb89948e..09452a8ce 100644
--- a/fs/ensure_symlink.ts
+++ b/fs/ensure_symlink.ts
@@ -2,7 +2,7 @@
import * as path from "./path/mod.ts";
import { ensureDir, ensureDirSync } from "./ensure_dir.ts";
import { exists, existsSync } from "./exists.ts";
-import { PathType, getFileInfoType } from "./utils.ts";
+import { getFileInfoType } from "./utils.ts";
const isWindows = Deno.platform.os === "win";
@@ -20,7 +20,7 @@ export async function ensureSymlink(src: string, dest: string): Promise<void> {
if (await exists(dest)) {
const destStatInfo = await Deno.lstat(dest);
const destFilePathType = getFileInfoType(destStatInfo);
- if (destFilePathType !== PathType.symlink) {
+ if (destFilePathType !== "symlink") {
throw new Error(
`Ensure path exists, expected 'symlink', got '${destFilePathType}'`
);
@@ -52,7 +52,7 @@ export function ensureSymlinkSync(src: string, dest: string): void {
if (existsSync(dest)) {
const destStatInfo = Deno.lstatSync(dest);
const destFilePathType = getFileInfoType(destStatInfo);
- if (destFilePathType !== PathType.symlink) {
+ if (destFilePathType !== "symlink") {
throw new Error(
`Ensure path exists, expected 'symlink', got '${destFilePathType}'`
);