Skip to content

Commit

Permalink
Replace panic with error on windows for symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkassimo authored and ry committed Oct 6, 2018
1 parent ba6c617 commit 1ac80fe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 1ac80fe

Please sign in to comment.