Skip to content

Commit 85543b5

Browse files
change order
1 parent 20db337 commit 85543b5

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

lfric_macros/validate_rose_meta.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -208,23 +208,22 @@ def main():
208208

209209
meta_paths = ""
210210
rose_meta_path = ""
211-
if args.apps or args.core:
212-
if args.apps:
213-
source_path = args.apps
214-
meta_paths += f"-M {os.path.join(args.apps, "rose-meta")}"
215-
rose_meta_path += args.apps
216-
if args.core:
217-
source_path = args.core
218-
meta_paths += f"-M {os.path.join(args.core, "rose-meta")} "
219-
if rose_meta_path:
220-
rose_meta_path += f":{args.core}"
221-
else:
222-
rose_meta_path = args.core
223-
else:
211+
if not args.apps and not args.core:
224212
raise RuntimeError(
225213
"At least one of the Apps or Core sources must be provided as a command "
226214
"line argument"
227215
)
216+
if args.apps:
217+
source_path = args.apps
218+
meta_paths += f"-M {os.path.join(args.apps, "rose-meta")}"
219+
rose_meta_path += args.apps
220+
if args.core:
221+
source_path = args.core
222+
meta_paths += f"-M {os.path.join(args.core, "rose-meta")} "
223+
if rose_meta_path:
224+
rose_meta_path += f":{args.core}"
225+
else:
226+
rose_meta_path = args.core
228227

229228
if check_rose_metadata(rose_meta_path, source_path) or check_rose_stem_apps(
230229
meta_paths, source_path

0 commit comments

Comments
 (0)