From 68357876caf39a55c310e08f304948f77b27721d Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 15 Dec 2019 05:44:34 +0300 Subject: [PATCH] fix v_command() --- v.v | 12 ++---------- vlib/compiler/main.v | 2 ++ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/v.v b/v.v index 7a20e78dc6..8e3d1ece44 100755 --- a/v.v +++ b/v.v @@ -83,38 +83,31 @@ fn main() { fn v_command(command string, args []string) { match command { '', '.', 'run' { - + return } 'version' { println('V $compiler.Version $compiler.vhash()') - return } 'help' { println(compiler.help_text) - return } 'translate' { println('Translating C to V will be available in V 0.3 (January)') - return } 'search', 'install', 'update' { compiler.launch_tool('vpm') } 'get' { println('use `v install` to install modules from vpm.vlang.io ') - return } 'symlink' { compiler.create_symlink() - return } 'fmt' { compiler.vfmt(args) - return } 'runrepl' { compiler.launch_tool('vrepl') - return } 'doc' { vexe := os.executable() @@ -126,14 +119,13 @@ fn v_command(command string, args []string) { panic(err) } println(txt) - exit(0) // v.gen_doc_html_for_module(args.last()) } else { println('v $command: unknown command') println('Run "v help" for usage.') - return } } + exit(0) } diff --git a/vlib/compiler/main.v b/vlib/compiler/main.v index e57a714d69..6bda2ec280 100644 --- a/vlib/compiler/main.v +++ b/vlib/compiler/main.v @@ -570,6 +570,7 @@ pub fn final_target_out_name(out_name string) string { } pub fn (v V) run_compiled_executable_and_exit() { + println('RUNNING') args := env_vflags_and_os_args() if v.pref.is_verbose { println('============ running $v.out_name ============') @@ -585,6 +586,7 @@ pub fn (v V) run_compiled_executable_and_exit() { break } } + println(args_after) cmd += args_after if v.pref.is_test {