From 3de186fccd8b492fe335beb51e65546ccd514db3 Mon Sep 17 00:00:00 2001 From: Tedi Mitiku Date: Tue, 19 Nov 2024 21:34:35 -0500 Subject: [PATCH] change location of err handle --- cli/cli/commands/run/run.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/cli/commands/run/run.go b/cli/cli/commands/run/run.go index 1c46202335..c2caf223d1 100755 --- a/cli/cli/commands/run/run.go +++ b/cli/cli/commands/run/run.go @@ -680,6 +680,9 @@ func getPackageDependencyYaml( var err error if isRemote { packageYaml, err = enclaveCtx.GetStarlarkPackagePlanYaml(ctx, starlarkScriptOrPackageId, packageArgs) + if err != nil { + return nil, stacktrace.Propagate(err, "An error occurred retrieving plan yaml for provided package.") + } } else { fileOrDir, err := os.Stat(starlarkScriptOrPackageId) if err != nil { @@ -694,9 +697,6 @@ func getPackageDependencyYaml( packageYaml, err = enclaveCtx.GetStarlarkScriptPlanYaml(ctx, string(scriptContentBytes), packageArgs) } } - if err != nil { - return nil, stacktrace.Propagate(err, "An error occurred retrieving plan yaml for provided package.") - } return packageYaml, nil }