1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -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::permission_denied;
use errors::DenoError;
use errors::DenoResult;
use errors::{DenoError, DenoResult, ErrorKind};
use fs as deno_fs;
use isolate::Buf;
use isolate::Isolate;
@ -967,7 +966,10 @@ fn op_symlink(
}
// TODO Use type for 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();