mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v.util,tools: use os.join_path_single
This commit is contained in:
@ -309,7 +309,7 @@ fn worker_trunner(mut p pool.PoolProcessor, idx int, thread_id int) voidptr {
|
||||
} else {
|
||||
fname.replace('.v', '')
|
||||
}
|
||||
generated_binary_fpath := os.join_path(tmpd, generated_binary_fname)
|
||||
generated_binary_fpath := os.join_path_single(tmpd, generated_binary_fname)
|
||||
if os.exists(generated_binary_fpath) {
|
||||
if ts.rm_binaries {
|
||||
os.rm(generated_binary_fpath) or {}
|
||||
@ -406,7 +406,7 @@ fn worker_trunner(mut p pool.PoolProcessor, idx int, thread_id int) voidptr {
|
||||
}
|
||||
|
||||
pub fn vlib_should_be_present(parent_dir string) {
|
||||
vlib_dir := os.join_path(parent_dir, 'vlib')
|
||||
vlib_dir := os.join_path_single(parent_dir, 'vlib')
|
||||
if !os.is_dir(vlib_dir) {
|
||||
eprintln('$vlib_dir is missing, it must be next to the V executable')
|
||||
exit(1)
|
||||
@ -427,7 +427,7 @@ pub fn prepare_test_session(zargs string, folder string, oskipped []string, main
|
||||
eprintln('v compiler args: "$vargs"')
|
||||
}
|
||||
mut session := new_test_session(vargs, true)
|
||||
files := os.walk_ext(os.join_path(parent_dir, folder), '.v')
|
||||
files := os.walk_ext(os.join_path_single(parent_dir, folder), '.v')
|
||||
mut mains := []string{}
|
||||
mut skipped := oskipped.clone()
|
||||
next_file: for f in files {
|
||||
@ -451,7 +451,7 @@ pub fn prepare_test_session(zargs string, folder string, oskipped []string, main
|
||||
maxc := if c.len > 300 { 300 } else { c.len }
|
||||
start := c[0..maxc]
|
||||
if start.contains('module ') && !start.contains('module main') {
|
||||
skipped_f := f.replace(os.join_path(parent_dir, ''), '')
|
||||
skipped_f := f.replace(os.join_path_single(parent_dir, ''), '')
|
||||
skipped << skipped_f
|
||||
}
|
||||
for skip_prefix in oskipped {
|
||||
|
@ -76,7 +76,7 @@ pub fn prepare_vc_source(vcdir string, cdir string, commit string) (string, stri
|
||||
|
||||
pub fn clone_or_pull(remote_git_url string, local_worktree_path string) {
|
||||
// NB: after clone_or_pull, the current repo branch is === HEAD === master
|
||||
if os.is_dir(local_worktree_path) && os.is_dir(os.join_path(local_worktree_path, '.git')) {
|
||||
if os.is_dir(local_worktree_path) && os.is_dir(os.join_path_single(local_worktree_path, '.git')) {
|
||||
// Already existing ... Just pulling in this case is faster usually.
|
||||
scripting.run('git -C "$local_worktree_path" checkout --quiet master')
|
||||
scripting.run('git -C "$local_worktree_path" pull --quiet ')
|
||||
@ -107,7 +107,7 @@ pub mut:
|
||||
|
||||
pub fn (mut vgit_context VGitContext) compile_oldv_if_needed() {
|
||||
vgit_context.vexename = if os.user_os() == 'windows' { 'v.exe' } else { 'v' }
|
||||
vgit_context.vexepath = os.real_path(os.join_path(vgit_context.path_v, vgit_context.vexename))
|
||||
vgit_context.vexepath = os.real_path(os.join_path_single(vgit_context.path_v, vgit_context.vexename))
|
||||
mut command_for_building_v_from_c_source := ''
|
||||
mut command_for_selfbuilding := ''
|
||||
if 'windows' == os.user_os() {
|
||||
|
Reference in New Issue
Block a user