generate: generate: Only log the file name when erroring out
Signed-off-by: Enno Tensing <tenno@suij.in>
This commit is contained in:
parent
d5ea5e64ee
commit
259c2ec8d7
1 changed files with 4 additions and 3 deletions
|
@ -76,11 +76,12 @@ def main() -> None:
|
|||
if len(sys.argv) > log_threshold:
|
||||
base = sys.argv[3]
|
||||
logger = Log(log_file)
|
||||
data = load_container_config(Path(config_file), logger)
|
||||
conf = Path(config_file)
|
||||
data = load_container_config(conf, logger)
|
||||
if data is None:
|
||||
logger.log_error(f"{config_file} is invalid, aborting!")
|
||||
logger.log_error(f"{conf.name} is invalid, aborting!")
|
||||
sys.exit(1)
|
||||
logger.set_prefix(Path(config_file).name)
|
||||
logger.set_prefix(conf.name)
|
||||
ct = create_container_from_config(data, logger)
|
||||
if ct is None:
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Add table
Reference in a new issue