mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
bin2v: validate .v file extension
This commit is contained in:
parent
30169f86c1
commit
13faf864cb
@ -101,8 +101,11 @@ fn main() {
|
|||||||
}
|
}
|
||||||
context.files = real_files
|
context.files = real_files
|
||||||
|
|
||||||
|
if !context.write_file.ends_with('.v') {
|
||||||
|
context.write_file += '.v'
|
||||||
|
}
|
||||||
if context.write_file.len > 0 {
|
if context.write_file.len > 0 {
|
||||||
mut out_file := os.create('${context.write_file}.v') or { panic(err) }
|
mut out_file := os.create(context.write_file) or { panic(err) }
|
||||||
out_file.write(context.header())
|
out_file.write(context.header())
|
||||||
for file in real_files {
|
for file in real_files {
|
||||||
out_file.write(context.file2v(file))
|
out_file.write(context.file2v(file))
|
||||||
|
Loading…
Reference in New Issue
Block a user