cli: warn users if they specify a missing file with @

This commit is contained in:
Ryan Petrello
2019-10-02 10:28:04 -04:00
parent 1f62d223a2
commit 6c1488ed00
2 changed files with 2 additions and 3 deletions

View File

@@ -165,8 +165,7 @@ class ResourceOptionsParser(object):
# (to make things like SSH key data easier to work with)
if isinstance(v, six.text_type) and v.startswith('@'):
path = os.path.expanduser(v[1:])
if os.path.exists(path):
parsed[k] = open(path).read()
parsed[k] = open(path).read()
return parsed