Browse Source

Merge pull request #92 from l4foss/fix_query_info

fix query info with -Si
J Guerreiro 7 năm trước cách đây
mục cha
commit
51b2f02eb8
2 tập tin đã thay đổi với 14 bổ sung9 xóa
  1. 1 1
      config.go
  2. 13 8
      query.go

+ 1 - 1
config.go

@@ -194,4 +194,4 @@ func continueTask(s string, def string) (cont bool) {
 	}
 
 	return true
-}
+}

+ 13 - 8
query.go

@@ -158,6 +158,19 @@ func syncInfo(pkgS []string, flags []string) (err error) {
 		return
 	}
 
+	//repo always goes first
+	if len(repoS) != 0 {
+		arguments := makeArguments()
+		arguments.addArg("S", "i")
+		//arguments.addArg(flags...)
+		arguments.addTarget(repoS...)
+		err = passToPacman(arguments)
+
+		if err != nil {
+			return
+		}
+	}
+
 	if len(aurS) != 0 {
 		q, err := rpc.Info(aurS)
 		if err != nil {
@@ -168,14 +181,6 @@ func syncInfo(pkgS []string, flags []string) (err error) {
 		}
 	}
 
-	if len(repoS) != 0 {
-		arguments := makeArguments()
-		arguments.addArg("S", "i")
-		//arguments.addArg(flags...)
-		arguments.addTarget(repoS...)
-		err = passToPacman(arguments)
-	}
-
 	return
 }