浏览代码

Remove redundant attempts to set install reasons (#2196)

Redundant attempts took place when the installation by pacman was
exited with code 1, i.e. an real error occurred or installation
was simply cancelled.
smolx 1 年之前
父节点
当前提交
35ee42d343
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      aur_install.go

+ 4 - 1
aur_install.go

@@ -426,6 +426,9 @@ func (installer *Installer) installSyncPackages(ctx context.Context, cmdArgs *pa
 
 	errShow := installer.exeCmd.Show(installer.exeCmd.BuildPacmanCmd(ctx,
 		arguments, installer.targetMode, noConfirm))
+	if errShow != nil {
+		return errShow
+	}
 
 	if errD := asdeps(ctx, installer.exeCmd, installer.targetMode, cmdArgs, syncDeps.ToSlice()); errD != nil {
 		return errD
@@ -435,5 +438,5 @@ func (installer *Installer) installSyncPackages(ctx context.Context, cmdArgs *pa
 		return errE
 	}
 
-	return errShow
+	return nil
 }