diff options
author | Rafael Vargas <vargas.rafael9@gmail.com> | 2020-02-03 10:20:15 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-03 08:20:15 -0500 |
commit | 55063dd8e8e3ae52eb90bdf42e36d979dcbb5010 (patch) | |
tree | deaa0b366a67d60d5a2bd4afdbed38fa845e0e48 /cli/js/remove.ts | |
parent | f168597b7ab81afda3bf4749a81c360d364e7cf1 (diff) |
fix: Deno.remove() to properly remove dangling symlinks (#3860)
For some reason, the unit tests for Deno.remove() were not being imported to
unit_tests.ts and, consequently, not being executed. Thus, I imported them,
refactored some existent ones and wrote new ones for the symlink removal case.
Since the creation of a symlink is not implemented for Windows yet, assertions
that consider this state were added when the tests are executed in this OS.
Diffstat (limited to 'cli/js/remove.ts')
-rw-r--r-- | cli/js/remove.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/js/remove.ts b/cli/js/remove.ts index d65c91879..f4b1bfe19 100644 --- a/cli/js/remove.ts +++ b/cli/js/remove.ts @@ -6,7 +6,7 @@ export interface RemoveOption { recursive?: boolean; } -/** Removes the named file or directory synchronously. Would throw +/** Removes the named file, directory or symlink synchronously. Would throw * error if permission denied, not found, or directory not empty if `recursive` * set to false. * `recursive` is set to false by default. @@ -17,7 +17,7 @@ export function removeSync(path: string, options: RemoveOption = {}): void { sendSync(dispatch.OP_REMOVE, { path, recursive: !!options.recursive }); } -/** Removes the named file or directory. Would throw error if +/** Removes the named file, directory or symlink. Would throw error if * permission denied, not found, or directory not empty if `recursive` set * to false. * `recursive` is set to false by default. |