Skip to content

Commit

Permalink
vcreate: don't use template names as project descriptions (#19439)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Oct 12, 2023
1 parent 11e67a1 commit 06fb8f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmd/tools/vcreate/tests/new_with_model_arg.expect
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion cmd/tools/vcreate/vcreate.v
Expand Up @@ -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}) ')
Expand Down
2 changes: 1 addition & 1 deletion cmd/tools/vcreate/vcreate_input_test.v
Expand Up @@ -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'
}
Expand Down

0 comments on commit 06fb8f0

Please sign in to comment.