1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

doc: fix doc command error running in vroot

This commit is contained in:
yuyi 2020-04-03 18:00:33 +08:00 committed by GitHub
parent 4cde6c0865
commit 50b9faf347
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,11 +56,6 @@ fn main() {
launch_tool(prefs2.is_verbose, 'v' + command) launch_tool(prefs2.is_verbose, 'v' + command)
return return
} }
if command in ['run', 'build'] || command.ends_with('.v') || os.exists(command) {
arg := join_flags_and_argument()
compile.compile(command, arg)
return
}
match command { match command {
'help' { 'help' {
invoke_help_and_exit(args) invoke_help_and_exit(args)
@ -100,6 +95,11 @@ fn main() {
} }
else {} else {}
} }
if command in ['run', 'build'] || command.ends_with('.v') || os.exists(command) {
arg := join_flags_and_argument()
compile.compile(command, arg)
return
}
eprintln('v $command: unknown command\nRun "v help" for usage.') eprintln('v $command: unknown command\nRun "v help" for usage.')
exit(1) exit(1)
} }