X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fxds%2Fxds-cli.git;a=blobdiff_plain;f=cmd-target.go;h=6140755edd9d6aa0cfe5be607b91803bc71bc14f;hp=33b757df5364e932d1ba42f4c1b308ca0d894af6;hb=5e7b2dec616b844dd881897727d0edceb90dfa85;hpb=35586adb40790f6b0b15c43d4bae86d29090736a diff --git a/cmd-target.go b/cmd-target.go index 33b757d..6140755 100644 --- a/cmd-target.go +++ b/cmd-target.go @@ -165,7 +165,7 @@ func targetsList(ctx *cli.Context) error { } func targetsGet(ctx *cli.Context) error { - id := GetID(ctx) + id := GetID(ctx, "XDS_TARGET_ID") if id == "" { return cli.NewExitError("id parameter or option must be set", 1) } @@ -254,7 +254,7 @@ func targetsAdd(ctx *cli.Context) error { func targetsRemove(ctx *cli.Context) error { var res xaapiv1.TargetConfig - id := GetID(ctx) + id := GetID(ctx, "XDS_TARGET_ID") if id == "" { return cli.NewExitError("id parameter or option must be set", 1) } @@ -543,7 +543,7 @@ func GetTargetAndTerminalIDs(ctx *cli.Context, useFirstFree bool) (*xaapiv1.Targ } // Allow to create a new terminal when only target id is set - idArg = GetIDName(ctx, "id") + idArg = GetIDName(ctx, "id", "XDS_TARGET_ID") if idArg == "" { return nil, nil, fmt.Errorf("id or termId argument must be set") }