Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit c14d906

Browse files
committed
update load to report error without input archive
1 parent 68d2a4e commit c14d906

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

api/client/load.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package client
22

33
import (
4+
"errors"
45
"io"
56

67
Cli "github.com/hyperhq/hypercli/cli"
@@ -20,6 +21,10 @@ func (cli *DockerCli) CmdLoad(args ...string) error {
2021
cmd.Require(flag.Exact, 0)
2122
cmd.ParseFlags(args, true)
2223

24+
if *infile == "" {
25+
return errors.New("remote archive must be specified via --input")
26+
}
27+
2328
var input struct {
2429
FromSrc string `json:"fromSrc"`
2530
Quiet bool `json:"quiet"`

0 commit comments

Comments
 (0)