From 94d00e8a4619bdd128e41d566ba9791d692a50c2 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Tue, 24 Feb 2026 06:12:34 -0800 Subject: [PATCH] cmd/cloudshell_open: fix dropped errors --- cmd/cloudshell_open/main.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/cloudshell_open/main.go b/cmd/cloudshell_open/main.go index 4c66b39a..bfc93f61 100644 --- a/cmd/cloudshell_open/main.go +++ b/cmd/cloudshell_open/main.go @@ -320,6 +320,9 @@ func run(opts runOpts) error { if err == nil { // service exists existingEnvVars, err = envVars(project, serviceName, region) + if err != nil { + return err + } } neededEnvs := needEnvs(appFile.Env, existingEnvVars) @@ -346,6 +349,10 @@ func run(opts runOpts) error { if appFile.Hooks.PreBuild.Commands != nil { err = runScripts(appDir, appFile.Hooks.PreBuild.Commands, hookEnvs) + if err != nil { + return fmt.Errorf("attempted to run prebuild scripts and failed: %s", err) + } + } skipBuild := appFile.Build.Skip != nil && *appFile.Build.Skip == true @@ -397,6 +404,9 @@ func run(opts runOpts) error { if appFile.Hooks.PostBuild.Commands != nil { err = runScripts(appDir, appFile.Hooks.PostBuild.Commands, hookEnvs) + if err != nil { + return fmt.Errorf("attempted to run postbuild scripts and failed: %s", err) + } } if pushImage {