Skip to content

Commit 4f78c5e

Browse files
committed
cmd/utils, test/system: Tweak an error message for consistency
Barring the first line, all other lines are terminated with a full stop elsewhere. containers#1099
1 parent 59f7121 commit 4f78c5e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/cmd/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func createErrorContainerNotFound(container string) error {
7474
func createErrorInvalidContainer(containerArg string) error {
7575
var builder strings.Builder
7676
fmt.Fprintf(&builder, "invalid argument for '%s'\n", containerArg)
77-
fmt.Fprintf(&builder, "Container names must match '%s'\n", utils.ContainerNameRegexp)
77+
fmt.Fprintf(&builder, "Container names must match '%s'.\n", utils.ContainerNameRegexp)
7878
fmt.Fprintf(&builder, "Run '%s --help' for usage.", executableBase)
7979

8080
errMsg := builder.String()

test/system/101-create.bats

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ teardown() {
4343

4444
assert_failure
4545
assert_line --index 0 "Error: invalid argument for 'CONTAINER'"
46-
assert_line --index 1 "Container names must match '[a-zA-Z0-9][a-zA-Z0-9_.-]*'"
46+
assert_line --index 1 "Container names must match '[a-zA-Z0-9][a-zA-Z0-9_.-]*'."
4747
assert_line --index 2 "Run 'toolbox --help' for usage."
4848
}
4949

@@ -52,7 +52,7 @@ teardown() {
5252

5353
assert_failure
5454
assert_line --index 0 "Error: invalid argument for '--container'"
55-
assert_line --index 1 "Container names must match '[a-zA-Z0-9][a-zA-Z0-9_.-]*'"
55+
assert_line --index 1 "Container names must match '[a-zA-Z0-9][a-zA-Z0-9_.-]*'."
5656
assert_line --index 2 "Run 'toolbox --help' for usage."
5757
}
5858

0 commit comments

Comments
 (0)