From 1322f3de9f60f86a9c4421169d84e7c7145c3e3b Mon Sep 17 00:00:00 2001 From: Jinho Bang Date: Tue, 16 Oct 2018 09:52:33 +0900 Subject: `deno -v` should report typescript version Fixes #993 --- src/version.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/version.rs') diff --git a/src/version.rs b/src/version.rs index bfd47012c..475ab319e 100644 --- a/src/version.rs +++ b/src/version.rs @@ -3,12 +3,11 @@ use libdeno; use std::ffi::CStr; // This is the source of truth for the Deno version. Ignore the value in Cargo.toml. -const DENO_VERSION: &str = "0.1.8"; +pub const DENO_VERSION: &str = "0.1.8"; -pub fn print_version() { +pub fn get_v8_version() -> &'static str { let v = unsafe { libdeno::deno_v8_version() }; let c_str = unsafe { CStr::from_ptr(v) }; let version = c_str.to_str().unwrap(); - println!("deno: {}", DENO_VERSION); - println!("v8: {}", version); + version } -- cgit v1.2.3