]> xenbits.xensource.com Git - people/gdunlap/xsatool/commitdiff
main: Accept an empty set of versions as 'all'
authorGeorge Dunlap <george.dunlap@citrix.com>
Fri, 19 May 2017 14:37:06 +0000 (15:37 +0100)
committerGeorge Dunlap <george.dunlap@citrix.com>
Fri, 19 May 2017 14:37:06 +0000 (15:37 +0100)
Signed-off-by: George Dunlap <george.dunlap@citrix.com>
main.go

diff --git a/main.go b/main.go
index 80b2a35281dd5e8cd314082a58ccfd48bd2036da..d8d87c998fd21f9a8793809d6c0978cbeaf4c1cd 100644 (file)
--- a/main.go
+++ b/main.go
@@ -32,7 +32,7 @@ func ForEachXenRepo(f func(*XenRepo, Tree) error) error {
 }
 
 func VersionsFromArgs(xsa *XSAMeta, args []string) (vers []XenVersion) {
-       if len(args) == 1 && args[0] == "all" {
+       if len(args) == 0 || (len(args) == 1 && args[0] == "all") {
                vers = append(vers, xsa.SupportedVersions...)
        } else {
                // FIXME: Verify xenversion format