Skip to content

Unhelpful error message when specifying incorrect environment #63

Closed
@hughsaunders

Description

Summary

When secrets.yml contains at least one environment, summon will tell you if you specify an invalid environment with -e.

If the secrets.yml contains no environments but an environment is specified with -e then a yaml parsing error is displayed, rather than a useful message about a missing environment.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Define secrets.yml: key: value
  2. Run summon -e test -f secrets.yml env

Expected Results

No such environment 'test' found in secrets file

Actual Results (including error logs, if applicable)

yaml: unmarshal errors:
  line 1: cannot unmarshal !!str `value` into map[string]yaml.Node

Reproducible

  • Always
  • Sometimes
  • Non-Reproducible

Version/Tag number

summon version 0.8.2

Environment setup

macOS 10.15.5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions