mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
pref: do not allow -o .v
This commit is contained in:
@@ -244,6 +244,10 @@ pub fn parse_args(args []string) (&Preferences, string) {
|
|||||||
}
|
}
|
||||||
'-o' {
|
'-o' {
|
||||||
res.out_name = cmdline.option(current_args, '-o', '')
|
res.out_name = cmdline.option(current_args, '-o', '')
|
||||||
|
if res.out_name.ends_with('.v') {
|
||||||
|
eprintln('Cannot save output binary in a .v file.')
|
||||||
|
exit(1)
|
||||||
|
}
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
'-b' {
|
'-b' {
|
||||||
|
|||||||
Reference in New Issue
Block a user