diff --git a/newa/__init__.py b/newa/__init__.py index 3d2ed88..4ccc99c 100644 --- a/newa/__init__.py +++ b/newa/__init__.py @@ -393,7 +393,7 @@ def load_data_from_location(location: str, else: stack = [location] data: dict[str, Any] = {} - if location.startswith('https://'): + if re.search('^https?://', location): data = yaml_parser().load(get_request( url=location, response_content=ResponseContentType.TEXT)) diff --git a/newa/cli.py b/newa/cli.py index 446a194..df6ec87 100644 --- a/newa/cli.py +++ b/newa/cli.py @@ -487,7 +487,10 @@ def cmd_schedule(ctx: CLIContext, arch: str) -> None: environment=ctx.cli_environment, context=ctx.cli_context) - config = RecipeConfig.from_yaml_url(jira_job.recipe.url) + if re.search('^https?://', jira_job.recipe.url): + config = RecipeConfig.from_yaml_url(jira_job.recipe.url) + else: + config = RecipeConfig.from_yaml_file(Path(jira_job.recipe.url)) # extend dimensions with system architecture but do not override existing settings if 'arch' not in config.dimensions: config.dimensions['arch'] = []