compiler: allows dir spelling with slash at the end
parent
79d4d56fe5
commit
3de99d365e
|
@ -678,6 +678,9 @@ fn new_v(args[]string) &V {
|
|||
if args.contains('run') {
|
||||
dir = get_all_after(joined_args, 'run', '')
|
||||
}
|
||||
if dir.ends_with('/') {
|
||||
dir = dir.all_before_last('/')
|
||||
}
|
||||
if args.len < 2 {
|
||||
dir = ''
|
||||
}
|
||||
|
@ -690,8 +693,10 @@ fn new_v(args[]string) &V {
|
|||
build_mode = .build
|
||||
// v -lib ~/v/os => os.o
|
||||
//mod = os.dir(dir)
|
||||
if dir.contains('/') {
|
||||
mod = dir.all_after('/')
|
||||
mod = if dir.contains('/') {
|
||||
dir.all_after('/')
|
||||
} else {
|
||||
dir
|
||||
}
|
||||
println('Building module "${mod}" (dir="$dir")...')
|
||||
//out_name = '$TmpPath/vlib/${base}.o'
|
||||
|
|
Loading…
Reference in New Issue