diff --git a/cli/run_util.go b/cli/run_util.go index 52e4f038..ad1a1a03 100644 --- a/cli/run_util.go +++ b/cli/run_util.go @@ -310,7 +310,7 @@ func (r WorkflowRunner) activateStep( } activator := newStepActivator() - stepYMLPth, origStepYMLPth, didStepLibUpdate, err := activator.activateStep(stepIDData, isStepLibUpdated, stepDir, configs.BitriseWorkDirPath, &stepInfoPtr, isStepLibOfflineMode) + stepYMLPth, didStepLibUpdate, err := activator.activateStep(stepIDData, isStepLibUpdated, stepDir, configs.BitriseWorkDirPath, &stepInfoPtr, isStepLibOfflineMode) if didStepLibUpdate { buildRunResults.StepmanUpdates[stepIDData.SteplibSource]++ } @@ -324,13 +324,7 @@ func (r WorkflowRunner) activateStep( specStep, err := bitrise.ReadSpecStep(stepYMLPth) log.Debugf("Spec read from YML: %#v", specStep) if err != nil { - ymlPth := stepYMLPth - if origStepYMLPth != "" { - // in case of local step (path:./) we use the original step definition path, - // instead of the activated step's one. - ymlPth = origStepYMLPth - } - err = fmt.Errorf("failed to parse step definition (%s): %s", ymlPth, err) + err = fmt.Errorf("parse step.yml of '%s': %s", stepIDData.IDorURI, err) return newActivateStepResult(stepmanModels.StepModel{}, stepInfoPtr, stepIDData, stepDir, err) } diff --git a/cli/step_activator.go b/cli/step_activator.go index 8642b749..8264e55d 100644 --- a/cli/step_activator.go +++ b/cli/step_activator.go @@ -23,7 +23,7 @@ func (a stepActivator) activateStep( workDir string, // $TMPDIR/bitrise stepInfoPtr *stepmanModels.StepInfoModel, isSteplibOfflineMode bool, -) (stepYMLPth string, origStepYMLPth string, didStepLibUpdate bool, err error) { +) (stepYMLPth string, didStepLibUpdate bool, err error) { stepmanLogger := log.NewLogger(log.GetGlobalLoggerOpts()) if stepIDData.SteplibSource == "path" { @@ -36,11 +36,10 @@ func (a stepActivator) activateStep( workDir, ) if err != nil { - return "", "", false, fmt.Errorf("activate local step: %w", err) + return "", false, fmt.Errorf("activate local step: %w", err) } stepYMLPth = activatedStep.StepYMLPath - origStepYMLPth = activatedStep.OrigStepYMLPath } else if stepIDData.SteplibSource == "git" { log.Debugf("[BITRISE_CLI] - Remote step, with direct git uri: (uri:%s) (tag-or-branch:%s)", stepIDData.IDorURI, stepIDData.Version) @@ -51,11 +50,10 @@ func (a stepActivator) activateStep( workDir, ) if err != nil { - return "", "", false, fmt.Errorf("activate git step reference: %w", err) + return "", false, fmt.Errorf("activate git step reference: %w", err) } stepYMLPth = activatedStep.StepYMLPath - origStepYMLPth = activatedStep.OrigStepYMLPath } else if stepIDData.SteplibSource != "" { activatedStep, err := activator.ActivateSteplibRefStep( stepmanLogger, @@ -68,14 +66,13 @@ func (a stepActivator) activateStep( ) didStepLibUpdate = activatedStep.DidStepLibUpdate if err != nil { - return "", "", didStepLibUpdate, fmt.Errorf("activate steplib step: %w", err) + return "", didStepLibUpdate, fmt.Errorf("activate steplib step: %w", err) } stepYMLPth = activatedStep.StepYMLPath - origStepYMLPth = activatedStep.OrigStepYMLPath } else { - return "", "", didStepLibUpdate, fmt.Errorf("invalid stepIDData: no SteplibSource or LocalPath defined (%v)", stepIDData) + return "", didStepLibUpdate, fmt.Errorf("invalid stepIDData: no SteplibSource or LocalPath defined (%v)", stepIDData) } - return stepYMLPth, origStepYMLPth, didStepLibUpdate, nil + return stepYMLPth, didStepLibUpdate, nil }