mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: fix v command to accept '.v' as valid file
This commit is contained in:
parent
51388fea75
commit
f461a21a50
|
@ -899,7 +899,7 @@ fn new_v(args[]string) &V {
|
|||
exit(1)
|
||||
}
|
||||
// No -o provided? foo.v => foo
|
||||
if out_name == 'a.out' && dir.ends_with('.v') {
|
||||
if out_name == 'a.out' && dir.ends_with('.v') && dir != '.v' {
|
||||
out_name = dir.left(dir.len - 2)
|
||||
}
|
||||
// if we are in `/foo` and run `v .`, the executable should be `foo`
|
||||
|
|
Loading…
Reference in New Issue
Block a user