Skip to content

Commit ce44040

Browse files
authored
[config] early return if cannot find GlobalDataPath (#739)
## Summary From inspecting the code, I think this should early return. The following statement about `readConfig(filepath.Join(dataPath, "devbox.json"))` doesn't make sense to execute if there's been an error in retrieving the `dataPath`. ## How was it tested? buildkite testscripts
1 parent cceb30b commit ce44040

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

internal/impl/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ func (c *Config) Packages(w io.Writer) []string {
5757
dataPath, err := GlobalDataPath()
5858
if err != nil {
5959
ux.Ferror(w, "unable to get devbox global data path: %s\n", err)
60+
return c.RawPackages
6061
}
6162
global, err := readConfig(filepath.Join(dataPath, "devbox.json"))
6263
if err != nil {

0 commit comments

Comments
 (0)