From 01e098aa77d87a8c9159a9f1f92e2ccbd6e4ca15 Mon Sep 17 00:00:00 2001 From: yuyi Date: Sat, 2 Jan 2021 19:17:39 +0800 Subject: [PATCH] vrepl: fix v repl on Windows (#7798) --- cmd/tools/vrepl.v | 4 ++-- vlib/v/util/util.v | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/tools/vrepl.v b/cmd/tools/vrepl.v index 28a07a3462..ac8df82b9d 100644 --- a/cmd/tools/vrepl.v +++ b/cmd/tools/vrepl.v @@ -28,8 +28,8 @@ const ( is_stdin_a_pipe = (is_atty(0) == 0) ) -fn new_repl() &Repl { - return &Repl{ +fn new_repl() Repl { + return Repl{ readline: readline.Readline{} modules: ['os', 'time', 'math'] } diff --git a/vlib/v/util/util.v b/vlib/v/util/util.v index 9c42de5e0b..d93a057f07 100644 --- a/vlib/v/util/util.v +++ b/vlib/v/util/util.v @@ -164,7 +164,7 @@ pub fn launch_tool(is_verbose bool, tool_name string, args []string) { if is_verbose { println('launch_tool running tool command: $tool_command ...') } - os.execvp(tool_exe, args) + os.system(tool_command) } // NB: should_recompile_tool/2 compares unix timestamps that have 1 second resolution