vcreate: don't use template names as project descriptions (#19439)

This commit is contained in:
Turiiya 2023-10-12 06:10:28 +02:00 committed by GitHub
parent 11e67a1a5f
commit 06fb8f0ffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ set model [lindex $argv 2]
spawn $v_root/v new $project_name $model
expect "Input your project description: " { send "My Awesome V Project.\r" } timeout { exit 1 }
expect "Input your project version: (0.0.0) " { send "0.0.1\r" } timeout { exit 1 }
expect "Input your project license: (MIT) " { send "\r" } timeout { exit 1 }
expect "Initialising ..." {} timeout { exit 1 }

View File

@ -81,7 +81,7 @@ fn new_project(args []string) {
exit(3)
}
c.description = if args.len > 1 { args[1] } else { os.input('Input your project description: ') }
c.description = os.input('Input your project description: ')
default_version := '0.0.0'
c.version = os.input('Input your project version: (${default_version}) ')

View File

@ -81,7 +81,7 @@ fn test_new_with_model_arg_input() {
return
}
assert mod.name == project_name
assert mod.description == model
assert mod.description == 'My Awesome V Project.'
assert mod.version == '0.0.1'
assert mod.license == 'MIT'
}