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

tools: fix v new abc (#16933)

This commit is contained in:
Hitalo Souza 2023-01-10 04:36:21 -03:00 committed by GitHub
parent 1582db1a0a
commit 8a986b994e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,8 @@ fn new_project(args []string) {
} }
println('Initialising ...') println('Initialising ...')
if args.len > 0 { // `v new abcde hello_world`
if args.len == 2 {
match os.args.last() { match os.args.last() {
'web' { 'web' {
c.set_web_project_files() c.set_web_project_files()
@ -111,6 +112,7 @@ fn new_project(args []string) {
} }
} }
} else { } else {
// `v new abc`
c.set_hello_world_project_files() c.set_hello_world_project_files()
} }