Skip to content

Commit 7b030ca

Browse files
authored
Merge pull request #815 from hkleen/fix_kicost_config
fix missing kicost config file parameter and expand env variables
2 parents c1e0f61 + 764f32f commit 7b030ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kibot/out_kicost.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,10 @@ def run(self, name):
215215
cmd.extend(self.translate_fields)
216216
# Config specified by the user
217217
if self.kicost_config:
218-
cfg_name = os.path.expanduser(self.kicost_config)
218+
cfg_name = os.path.abspath(os.path.expandvars(os.path.expanduser(self.kicost_config)))
219219
if not os.path.isfile(cfg_name):
220220
raise KiPlotConfigurationError(f"Missing config file: `{cfg_name}`")
221-
cmd.extend(['--config', ])
221+
cmd.extend(['--config', cfg_name])
222222
# Run the command
223223
try:
224224
run_command(cmd, err_msg='Failed to create costs spreadsheet, error {ret}', err_lvl=BOM_ERROR)

0 commit comments

Comments
 (0)