Skip to content

Commit 77dd05c

Browse files
committed
cli/command/image: remove errStdinConflict
This error was only used in a single location, so no need to define a package-level variable for this. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 7d723e2 commit 77dd05c

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

cli/command/image/build.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ import (
3434
"github.com/spf13/cobra"
3535
)
3636

37-
var errStdinConflict = errors.New("invalid argument: can't use stdin for both build context and dockerfile")
38-
3937
type buildOptions struct {
4038
context string
4139
dockerfileName string
@@ -189,7 +187,7 @@ func runBuild(dockerCli command.Cli, options buildOptions) error {
189187

190188
if options.dockerfileFromStdin() {
191189
if options.contextFromStdin() {
192-
return errStdinConflict
190+
return errors.New("invalid argument: can't use stdin for both build context and dockerfile")
193191
}
194192
dockerfileCtx = dockerCli.In()
195193
}

0 commit comments

Comments
 (0)