mirror of https://github.com/docker/cli.git
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:
parent
7d723e2ba7
commit
77dd05caad
|
@ -34,8 +34,6 @@ import (
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errStdinConflict = errors.New("invalid argument: can't use stdin for both build context and dockerfile")
|
|
||||||
|
|
||||||
type buildOptions struct {
|
type buildOptions struct {
|
||||||
context string
|
context string
|
||||||
dockerfileName string
|
dockerfileName string
|
||||||
|
@ -189,7 +187,7 @@ func runBuild(dockerCli command.Cli, options buildOptions) error {
|
||||||
|
|
||||||
if options.dockerfileFromStdin() {
|
if options.dockerfileFromStdin() {
|
||||||
if options.contextFromStdin() {
|
if options.contextFromStdin() {
|
||||||
return errStdinConflict
|
return errors.New("invalid argument: can't use stdin for both build context and dockerfile")
|
||||||
}
|
}
|
||||||
dockerfileCtx = dockerCli.In()
|
dockerfileCtx = dockerCli.In()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue