From 1b8609c31883674028711a8e42fcf4078434fe99 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 20 Nov 2020 02:38:20 +0200 Subject: [PATCH] builder: fix for `v -o x.exe run examples/hello_world.v` --- vlib/v/builder/compile.v | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vlib/v/builder/compile.v b/vlib/v/builder/compile.v index 8e5c277bff..9ab79b7c66 100644 --- a/vlib/v/builder/compile.v +++ b/vlib/v/builder/compile.v @@ -96,9 +96,11 @@ fn (mut b Builder) run_compiled_executable_and_exit() { bundle_id := if b.pref.bundle_id != '' { b.pref.bundle_id } else { 'app.vlang.$bundle_name' } os.exec('xcrun simctl launch $device $bundle_id') } else { - mut cmd := '"$b.pref.out_name"' + exefile := os.real_path(b.pref.out_name) + mut cmd := '"$exefile"' if b.pref.backend == .js { - cmd = 'node "${b.pref.out_name}.js"' + jsfile := os.real_path('${b.pref.out_name}.js') + cmd = 'node "$jsfile"' } for arg in b.pref.run_args { // Determine if there are spaces in the parameters