Allow expansion of environment variables in paths
This commit is contained in:
parent
b92a233b1d
commit
7ba7794a14
|
|
@ -357,6 +357,7 @@ class CfgYamlReader(object):
|
|||
config_error("`import` entry without `file` ({})".format(str(entry)))
|
||||
else:
|
||||
config_error("`import` items must be strings or dicts ({})".format(str(entry)))
|
||||
fn = os.path.expandvars(os.path.expanduser(fn))
|
||||
if not os.path.isabs(fn):
|
||||
fn = os.path.join(dir, fn)
|
||||
if not os.path.isfile(fn):
|
||||
|
|
|
|||
|
|
@ -378,7 +378,9 @@ class KiBoMOptions(BaseOptions):
|
|||
kibom_command = self.ensure_tool('KiBoM')
|
||||
format = self.format.lower()
|
||||
prj = GS.sch_no_ext
|
||||
config = os.path.join(GS.sch_dir, self.conf)
|
||||
config = os.path.expandvars(os.path.expanduser(self.conf))
|
||||
if not os.path.isabs(config):
|
||||
config = os.path.join(GS.sch_dir, config)
|
||||
if self.output:
|
||||
force_output = True
|
||||
output = name
|
||||
|
|
|
|||
Loading…
Reference in New Issue