From c5c3abc517a1729c2fcc0977bb1e792e06b7eb3c Mon Sep 17 00:00:00 2001 From: dubiousjim Date: Fri, 3 Apr 2020 13:45:44 -0400 Subject: adjust docs for Deno.seek (#4610) --- cli/ops/fs.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cli/ops') diff --git a/cli/ops/fs.rs b/cli/ops/fs.rs index c076b2b24..43f3db614 100644 --- a/cli/ops/fs.rs +++ b/cli/ops/fs.rs @@ -226,12 +226,14 @@ fn op_seek( }; let mut file = futures::executor::block_on(tokio_file.try_clone())?; + let is_sync = args.promise_id.is_none(); let fut = async move { + debug!("op_seek {} {} {}", rid, offset, whence); let pos = file.seek(seek_from).await?; Ok(json!(pos)) }; - if args.promise_id.is_none() { + if is_sync { let buf = futures::executor::block_on(fut)?; Ok(JsonOp::Sync(buf)) } else { -- cgit v1.2.3