mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: update chdir usages
This commit is contained in:
parent
853d3cb83e
commit
29f550158e
@ -444,7 +444,7 @@ pub fn building_any_v_binaries_failed() bool {
|
||||
vexe := pref.vexe_path()
|
||||
parent_dir := os.dir(vexe)
|
||||
vlib_should_be_present(parent_dir)
|
||||
os.chdir(parent_dir)
|
||||
os.chdir(parent_dir) or { panic(err) }
|
||||
mut failed := false
|
||||
v_build_commands := ['$vexe -o v_g -g cmd/v', '$vexe -o v_prod_g -prod -g cmd/v',
|
||||
'$vexe -o v_cg -cg cmd/v', '$vexe -o v_prod_cg -prod -cg cmd/v',
|
||||
|
@ -133,7 +133,7 @@ const (
|
||||
fn main() {
|
||||
vexe := pref.vexe_path()
|
||||
vroot := os.dir(vexe)
|
||||
os.chdir(vroot)
|
||||
os.chdir(vroot) or { panic(err) }
|
||||
args := os.args.clone()
|
||||
args_string := args[1..].join(' ')
|
||||
cmd_prefix := args_string.all_before('test-self')
|
||||
|
@ -5,7 +5,7 @@ const source = 'vlib/flag/testdata/simplest_flag_program.v'
|
||||
const simple_flag_app_executable = os.real_path(os.join_path(os.cache_dir(), 'simple_flag_app.exe'))
|
||||
|
||||
fn testsuite_begin() {
|
||||
os.chdir(@VMODROOT)
|
||||
os.chdir(@VMODROOT) or {}
|
||||
os.rm(simple_flag_app_executable) or {}
|
||||
res := os.execute('${@VEXE} -o $simple_flag_app_executable $source')
|
||||
assert res.exit_code == 0
|
||||
|
@ -5,7 +5,7 @@ const the_source = 'vlib/flag/testdata/usage_example.v'
|
||||
const the_executable = os.real_path(os.join_path(os.cache_dir(), 'flag_usage_example_app.exe'))
|
||||
|
||||
fn testsuite_begin() {
|
||||
os.chdir(@VMODROOT)
|
||||
os.chdir(@VMODROOT) or {}
|
||||
os.rm(the_executable) or {}
|
||||
res := os.execute('${@VEXE} -o $the_executable $the_source')
|
||||
assert res.exit_code == 0
|
||||
|
Loading…
Reference in New Issue
Block a user