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 /
|
"""Check if there is a variable name to specify a custom version /
|
||||||
directory to use instead of the current url.
|
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:
|
if not d:
|
||||||
return
|
return
|
||||||
if not exists(d):
|
if not exists(d):
|
||||||
return
|
raise ValueError("Invalid path passed into {}".format(envname))
|
||||||
return d
|
return d
|
||||||
|
|
||||||
@cache_execution
|
@cache_execution
|
||||||
|
|
Loading…
Add table
Reference in a new issue