mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: option/command parsing bugfix
This commit is contained in:
parent
37add98043
commit
ba519f105a
@ -1126,9 +1126,13 @@ pub fn new_v(args[]string) &V {
|
||||
}
|
||||
}
|
||||
|
||||
fn non_empty(a []string) []string {
|
||||
return a.filter(it.len != 0)
|
||||
}
|
||||
|
||||
pub fn env_vflags_and_os_args() []string {
|
||||
vosargs := os.getenv('VOSARGS')
|
||||
if '' != vosargs { return vosargs.split(' ') }
|
||||
if '' != vosargs { return non_empty(vosargs.split(' ')) }
|
||||
|
||||
mut args := []string
|
||||
vflags := os.getenv('VFLAGS')
|
||||
@ -1141,7 +1145,7 @@ pub fn env_vflags_and_os_args() []string {
|
||||
} else{
|
||||
args << os.args
|
||||
}
|
||||
return args
|
||||
return non_empty(args)
|
||||
}
|
||||
|
||||
pub fn vfmt(args[]string) {
|
||||
|
Loading…
Reference in New Issue
Block a user