Skip to content

Commit

Permalink
Adds missing error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
leucos committed Oct 30, 2020
1 parent 6b89470 commit 4a5f09a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ To benefit from new additions, you need to update the distribution list from
time to time.

This list is usually located in your home directory under
`$XDG_CONFIG/distributions.yaml` or `~/.config/binenv/distribution.yaml`).
`$XDG_CONFIG/distributions.yaml` (often `~/.config/binenv/distribution.yaml`).

To update only distributions:

Expand Down Expand Up @@ -367,7 +367,7 @@ All other versions are available to be installed.

```
$ binenv versions
terraform: 0.13.1 (/home/leucos/dev/perso/devops.works/github-repos/binenv) 0.13.0 0.13.0-rc1 0.13.0-beta3 0.13.0-beta2 0.13.0-beta1 0.12.29 0.12.28 0.12.27 0.12.26 0.12.25 0.12.24 0.12.23 0.12.22 0.12.21 0.12.20 0.12.19 0.12.18 0.12.17 0.12.16 0.12.15 0.12.14 0.12.13 0.12.12 0.12.11 0.12.10 0.12.9 0.12.8 0.12.7 0.12.6
terraform: 0.13.1 (/home/you/some/dir) 0.13.0 0.13.0-rc1 0.13.0-beta3 0.13.0-beta2 0.13.0-beta1 0.12.29 0.12.28 0.12.27 0.12.26 0.12.25 0.12.24 0.12.23 0.12.22 0.12.21 0.12.20 0.12.19 0.12.18 0.12.17 0.12.16 0.12.15 0.12.14 0.12.13 0.12.12 0.12.11 0.12.10 0.12.9 0.12.8 0.12.7 0.12.6
terragrunt: 0.23.38 0.23.37 0.23.36 0.23.35 0.23.34 0.23.33 0.23.32 0.23.31 0.23.30 0.23.29 0.23.28 0.23.27 0.23.26 0.23.25 0.23.24 0.23.23 0.23.22 0.23.21 0.23.20 0.23.19 0.23.18 0.23.17 0.23.16 0.23.15 0.23.14 0.23.13 0.23.12 0.23.11 0.23.10 0.23.9
toji: 0.2.4 (default) 0.2.2
vault: 1.5.3 1.5.2 1.5.1 1.5.0 1.5.0-rc 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.4.0-rc1 1.4.0-beta1 1.3.10 1.3.9 1.3.8 1.3.7 1.3.6 1.3.5 1.3.4 1.3.3 1.3.2 1.3.1 1.3.0 1.3.0-beta1 1.2.7 1.2.6 1.2.5 1.2.4
Expand Down
6 changes: 5 additions & 1 deletion internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,11 @@ func (a *App) Update(definitions, all bool, cache bool, which ...string) error {
a.logger.Error().Err(err).Msg("unable to find distributions")
os.Exit(1)
}
a.fetchDistributions(conf)
err = a.fetchDistributions(conf)
if err != nil {
a.logger.Error().Err(err).Msgf("unable to fetch distributions: %v", err)
os.Exit(1)
}

// Return if only definitions were requested
if definitions {
Expand Down

0 comments on commit 4a5f09a

Please sign in to comment.