Aliases do not work with IsSet

Have to specify all names.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #933
Approved by: baude
This commit is contained in:
Daniel J Walsh
2018-06-11 15:51:38 -04:00
committed by Atomic Bot
parent 9b72746f9a
commit ab72130650
4 changed files with 5 additions and 5 deletions

View File

@ -79,7 +79,7 @@ func commitCmd(c *cli.Context) error {
switch c.String("format") { switch c.String("format") {
case "oci": case "oci":
mimeType = buildah.OCIv1ImageManifest mimeType = buildah.OCIv1ImageManifest
if c.IsSet("message") { if c.IsSet("message") || c.IsSet("m") {
return errors.Errorf("messages are only compatible with the docker image format (-f docker)") return errors.Errorf("messages are only compatible with the docker image format (-f docker)")
} }
case "docker": case "docker":
@ -89,7 +89,7 @@ func commitCmd(c *cli.Context) error {
} }
container := args[0] container := args[0]
reference := args[1] reference := args[1]
if c.IsSet("change") { if c.IsSet("change") || c.IsSet("c") {
for _, change := range c.StringSlice("change") { for _, change := range c.StringSlice("change") {
splitChange := strings.Split(strings.ToUpper(change), "=") splitChange := strings.Split(strings.ToUpper(change), "=")
if !util.StringInSlice(splitChange[0], libpod.ChangeCmds) { if !util.StringInSlice(splitChange[0], libpod.ChangeCmds) {

View File

@ -401,7 +401,7 @@ func parseCreateOpts(ctx context.Context, c *cli.Context, runtime *libpod.Runtim
// WORKING DIRECTORY // WORKING DIRECTORY
workDir := "/" workDir := "/"
if c.IsSet("workdir") { if c.IsSet("workdir") || c.IsSet("w") {
workDir = c.String("workdir") workDir = c.String("workdir")
} else if data.ContainerConfig.WorkingDir != "" { } else if data.ContainerConfig.WorkingDir != "" {
workDir = data.ContainerConfig.WorkingDir workDir = data.ContainerConfig.WorkingDir

View File

@ -80,7 +80,7 @@ func importCmd(c *cli.Context) error {
} }
changes := v1.ImageConfig{} changes := v1.ImageConfig{}
if c.IsSet("change") { if c.IsSet("change") || c.IsSet("c") {
changes, err = util.GetImageConfig(c.StringSlice("change")) changes, err = util.GetImageConfig(c.StringSlice("change"))
if err != nil { if err != nil {
return errors.Wrapf(err, "error adding config changes to image %q", source) return errors.Wrapf(err, "error adding config changes to image %q", source)

View File

@ -173,7 +173,7 @@ func runCmd(c *cli.Context) error {
} }
// If attach is set, clear stdin/stdout/stderr and only attach requested // If attach is set, clear stdin/stdout/stderr and only attach requested
if c.IsSet("attach") { if c.IsSet("attach") || c.IsSet("a") {
outputStream = nil outputStream = nil
errorStream = nil errorStream = nil
inputStream = nil inputStream = nil