diff options
author | Dmitry Sharshakov <sh7dm@outlook.com> | 2019-02-15 19:22:02 +0300 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-02-15 11:22:02 -0500 |
commit | 4dc4329e270f617697154ca62a828cce3b46b348 (patch) | |
tree | 54edb5a9d3374fa6470fdc9ab5c50b9738dd4a35 /src | |
parent | 1d7c74e9b5c416c58b66246a6bbc907399fe9083 (diff) |
Add execPath function (#1743)
Diffstat (limited to 'src')
-rw-r--r-- | src/msg.fbs | 3 | ||||
-rw-r--r-- | src/ops.rs | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/msg.fbs b/src/msg.fbs index f3c47faf6..81345d156 100644 --- a/src/msg.fbs +++ b/src/msg.fbs @@ -65,7 +65,7 @@ union Any { Now, NowRes, IsTTY, - IsTTYRes + IsTTYRes, } enum ErrorKind: byte { @@ -156,6 +156,7 @@ table StartRes { cwd: string; pid: uint32; argv: [string]; + exec_path: string; debug_flag: bool; deps_flag: bool; types_flag: bool; diff --git a/src/ops.rs b/src/ops.rs index a968ae6e1..e303196ca 100644 --- a/src/ops.rs +++ b/src/ops.rs @@ -252,6 +252,9 @@ fn op_start( let cwd_off = builder.create_string(deno_fs::normalize_path(cwd_path.as_ref()).as_ref()); + let exec_path = + builder.create_string(std::env::current_exe().unwrap().to_str().unwrap()); + let v8_version = version::v8(); let v8_version_off = builder.create_string(v8_version); @@ -270,6 +273,7 @@ fn op_start( v8_version: Some(v8_version_off), deno_version: Some(deno_version_off), no_color: !ansi::use_color(), + exec_path: Some(exec_path), ..Default::default() }, ); |