toolchain: display proper error if the environ _DIR is not valid
This commit is contained in:
parent
9826a7cba0
commit
ee1b4dba0e
1 changed files with 3 additions and 2 deletions
|
@ -556,11 +556,12 @@ class Recipe(object):
|
|||
"""Check if there is a variable name to specify a custom version /
|
||||
directory to use instead of the current url.
|
||||
"""
|
||||
d = environ.get("{}_DIR".format(self.name.upper()))
|
||||
envname = "{}_DIR".format(self.name.upper())
|
||||
d = environ.get(envname)
|
||||
if not d:
|
||||
return
|
||||
if not exists(d):
|
||||
return
|
||||
raise ValueError("Invalid path passed into {}".format(envname))
|
||||
return d
|
||||
|
||||
@cache_execution
|
||||
|
|
Loading…
Reference in a new issue