Skip to content

Commit

Permalink
fixes error message at every call when token is missing
Browse files Browse the repository at this point in the history
when token is missing and a private repo is set, we output an error

this has been removed while a better solution is designed
  • Loading branch information
leucos committed Jul 18, 2024
1 parent 704441e commit 830a798
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ func (a *App) Init(o ...func(*App) error) error {

a.createMappers()
a.createListers()
err = a.createFetchers()
if err != nil {
// No need to return; it would display binenv usage
a.logger.Error().Err(err).Msgf("unable to create fetchers")
os.Exit(1)
}
_ = a.createFetchers()
// if err != nil {
// // No need to return; it would display binenv usage
// a.logger.Error().Err(err).Msgf("unable to create fetchers")
// os.Exit(1)
// }
a.createInstallers()

a.initializeFlags()
Expand Down Expand Up @@ -347,7 +347,7 @@ func (a *App) Install(specs ...string) error {
func (a *App) install(dist, version string) (string, error) {
// Check if distribution is managed by us
if a.fetchers[dist] == nil {
return "", fmt.Errorf("no fetcher found for %q", dist)
return "", fmt.Errorf("no fetcher found or missing token for %q", dist)
}
if _, ok := a.fetchers[dist]; !ok {
a.logger.Error().Msgf("no such distribution %q", dist)
Expand Down

0 comments on commit 830a798

Please sign in to comment.