0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-08 15:21:26 -05:00

Replace panic with error on windows for symlink

This commit is contained in:
Kevin (Kun) "Kassimo" Qian 2018-10-05 17:37:18 -07:00 committed by Ryan Dahl
parent ba6c617432
commit 1ac80feb1c

View file

@ -2,8 +2,7 @@
use errors; use errors;
use errors::permission_denied; use errors::permission_denied;
use errors::DenoError; use errors::{DenoError, DenoResult, ErrorKind};
use errors::DenoResult;
use fs as deno_fs; use fs as deno_fs;
use isolate::Buf; use isolate::Buf;
use isolate::Isolate; use isolate::Isolate;
@ -967,7 +966,10 @@ fn op_symlink(
} }
// TODO Use type for Windows. // TODO Use type for Windows.
if cfg!(windows) { if cfg!(windows) {
panic!("symlink for windows is not yet implemented") return odd_future(errors::new(
ErrorKind::Other,
"symlink for windows is not yet implemented".to_string(),
));
} }
let inner = base.inner_as_symlink().unwrap(); let inner = base.inner_as_symlink().unwrap();