Browse Source

chore(install): reduce scope of toSkipSlice

jguer 3 years ago
parent
commit
1fb9f410a6
1 changed files with 1 additions and 2 deletions
  1. 1 2
      install.go

+ 1 - 2
install.go

@@ -239,8 +239,7 @@ func install(ctx context.Context, cmdArgs *parser.Arguments, dbExecutor db.Execu
 		}
 	}
 
-	toSkipSlice := toSkip.ToSlice()
-	if len(toSkipSlice) != 0 {
+	if toSkipSlice := toSkip.ToSlice(); len(toSkipSlice) != 0 {
 		text.OperationInfoln(
 			gotext.Get("PKGBUILD up to date, Skipping (%d/%d): %s",
 				len(toSkipSlice), len(toClone), text.Cyan(strings.Join(toSkipSlice, ", "))))