mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
printer-linter: exit on invalid definition file paths
This PR prevents silent failure with empty diagnostics if an invalid file path was provided
This commit is contained in:
parent
4a0711b665
commit
358f20a94e
1 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
from argparse import ArgumentParser
|
||||
from os import getcwd
|
||||
from os import path
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
|
@ -41,6 +42,11 @@ def main() -> None:
|
|||
|
||||
full_body_check = {"Diagnostics": []}
|
||||
|
||||
for file in files:
|
||||
if not path.exists(file):
|
||||
print(f"Can't find the file: {file}")
|
||||
return
|
||||
|
||||
if to_fix or to_diagnose:
|
||||
for file in files:
|
||||
diagnostics = diagnoseIssuesWithFile(file, settings)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue