Merge pull request #1756 from StefanScherer/fix/packer-minus-minus-version
fixed `packer --version` to show version again
This commit is contained in:
commit
496d1fe9b5
1
main.go
1
main.go
|
@ -166,6 +166,7 @@ func wrappedMain() int {
|
|||
Commands: Commands,
|
||||
HelpFunc: cli.BasicHelpFunc("packer"),
|
||||
HelpWriter: os.Stdout,
|
||||
Version: Version,
|
||||
}
|
||||
|
||||
exitCode, err := cli.Run()
|
||||
|
|
|
@ -17,20 +17,20 @@ load test_helper
|
|||
[[ "$output" == *"Packer v"* ]]
|
||||
|
||||
run packer -v
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"Packer v"* ]]
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" =~ ([0-9]+\.[0-9]+) ]]
|
||||
|
||||
run packer --version
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"Packer v"* ]]
|
||||
[ "$status" -eq 1 ]
|
||||
[[ "$output" =~ ([0-9]+\.[0-9]+) ]]
|
||||
}
|
||||
|
||||
@test "cli: packer version show help" {
|
||||
run packer version -h
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"usage: packer version"* ]]
|
||||
[[ "$output" == *"Packer v"* ]]
|
||||
|
||||
run packer version --help
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"usage: packer version"* ]]
|
||||
[[ "$output" == *"Packer v"* ]]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue