diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e4090cc..4e010a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,15 +5,10 @@ on: push: branches: - main - paths: - - ".github/workflows/test.yml" - - "src/re_plugin_pack/**" - - "tests/**" - - "pyproject.toml" pull_request: paths: - ".github/workflows/test.yml" - - "src/re_plugin_pack/**" + - "src/**" - "tests/**" - "pyproject.toml" jobs: diff --git a/src/render_engine_cli/utils.py b/src/render_engine_cli/utils.py index fd66420..dde8414 100644 --- a/src/render_engine_cli/utils.py +++ b/src/render_engine_cli/utils.py @@ -216,6 +216,8 @@ def get_editor(ctx: click.Context, param: click.Option, value: str) -> str | Non def handle_content_file(ctx: click.Context, param: click.Option, value: str) -> str | None: """Handle the content file""" + if value is None: + return "" if value == "stdin": content = list() click.secho('Please enter the content. To finish, put a "." on a blank line.', fg="green") @@ -223,7 +225,7 @@ def handle_content_file(ctx: click.Context, param: click.Option, value: str) -> content.append(line) return "\n".join(content) path = Path(value) - if not path.exists(): + if not path.exists() or path.is_dir(): raise click.exceptions.BadParameter( f'Either the path to a file or "stdin" must be provided. {repr(value)} is invalid.' )