summon-conjur icon indicating copy to clipboard operation
summon-conjur copied to clipboard

Unhelpful error message when specifying incorrect environment

Open hughsaunders opened this issue 3 years ago • 0 comments

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

  • [x] Always
  • [ ] Sometimes
  • [ ] Non-Reproducible

Version/Tag number

summon version 0.8.2

Environment setup

macOS 10.15.5

hughsaunders avatar Jul 08 '20 11:07 hughsaunders