Changed error method accordingly @wolfogre

This commit is contained in:
Markus Löffler 2023-06-06 09:54:53 +02:00
parent 3ab04768e8
commit a228edaaf6
No known key found for this signature in database
GPG key ID: 7E0675A8D21D8D2D

View file

@ -198,7 +198,7 @@ func registerInteractive(configFile string) error {
if stage == StageWaitingForRegistration {
log.Infof("Registering runner, name=%s, instance=%s, labels=%v.", inputs.RunnerName, inputs.InstanceAddr, inputs.CustomLabels)
if err := doRegister(cfg, inputs); err != nil {
return errors.New("Failed to register runner: " + err.Error())
return fmt.Errorf("Failed to register runner: %w", err)
} else {
log.Infof("Runner registered successfully.")
}