Skip to content

Commit

Permalink
refactor: skip install when the account is invalid.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitxeno committed Oct 25, 2024
1 parent cbb87c0 commit 17e4e31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/task/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,15 @@ func (t *Task) runInternal(v model.InstalledApp) error {
if err != nil {
log.Err(err).Msgf("Error executing installation script. %s", installMgr.ErrorLog())
installMgr.WriteLog(err.Error())
if strings.Contains(installMgr.ErrorLog(), "Can't log-in") || strings.Contains(installMgr.ErrorLog(), "DeveloperSession creation failed") {
t.InvalidAccounts[v.Account] = true
}
return err
}
if strings.Contains(installMgr.OutputLog(), "Installation Succeeded") {
return nil
} else {
if strings.Contains(installMgr.ErrorLog(), "Can't log-in") {
if strings.Contains(installMgr.ErrorLog(), "Can't log-in") || strings.Contains(installMgr.ErrorLog(), "DeveloperSession creation failed") {
t.InvalidAccounts[v.Account] = true
}
return fmt.Errorf("%s", installMgr.ErrorLog())
Expand Down

0 comments on commit 17e4e31

Please sign in to comment.