1
0
mirror of https://github.com/docker/cli.git synced 2026-01-16 20:22:36 +03:00

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>
This commit is contained in:
Sebastiaan van Stijn
2023-06-13 13:47:56 +02:00
parent 7d723e2ba7
commit 77dd05caad

View File

@@ -34,8 +34,6 @@ import (
"github.com/spf13/cobra"
)
var errStdinConflict = errors.New("invalid argument: can't use stdin for both build context and dockerfile")
type buildOptions struct {
context string
dockerfileName string
@@ -189,7 +187,7 @@ func runBuild(dockerCli command.Cli, options buildOptions) error {
if options.dockerfileFromStdin() {
if options.contextFromStdin() {
return errStdinConflict
return errors.New("invalid argument: can't use stdin for both build context and dockerfile")
}
dockerfileCtx = dockerCli.In()
}