Skip to content

Commit 5a6f585

Browse files
authored
Envsec errors do not block devbox (#1649)
## Summary I've encountered a few scenarios when testing envsec + Jetpack secrets where an issue with authentication of the envsec server prevented me from starting my shell. Since envsec errors also require an internet connection, an unstable connection can prevent me from starting my local dev environment This PR changes a line in env.go so that Envsec errors will be logged, instead of causing Devbox to fail ## How was it tested? Tested on a local new project, with the following scenarios: - User not logged in - Project missing a github repo - Project has a repo but no remote
1 parent 9289b0d commit 5a6f585

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/devconfig/env.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package devconfig
22

33
import (
44
"context"
5+
"fmt"
6+
"os"
57

68
"go.jetpack.io/devbox/internal/boxcli/usererr"
79
"go.jetpack.io/devbox/internal/integrations/envsec"
@@ -16,7 +18,7 @@ func (c *Config) ComputedEnv(
1618
if c.IsEnvsecEnabled() {
1719
env, err = envsec.Env(ctx, projectDir)
1820
if err != nil {
19-
return nil, err
21+
fmt.Fprintf(os.Stderr, "Error reading secrets from envsec: %s\n\n", err)
2022
}
2123
} else if c.EnvFrom != "" {
2224
return nil, usererr.New("unknown from_env value: %s", c.EnvFrom)

0 commit comments

Comments
 (0)