From 7c572c35ab45d1adf2fa28ada59908b085752d66 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Tue, 30 May 2023 18:38:04 -0700 Subject: [PATCH] Fix github actions by allowing empty string --sources flag (#218) --- flux_local/tool/selector.py | 2 ++ tests/tool/testdata/diff_ks_yaml_empty_sources.yaml | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/tool/testdata/diff_ks_yaml_empty_sources.yaml diff --git a/flux_local/tool/selector.py b/flux_local/tool/selector.py index f5c4c407..8c7456f8 100644 --- a/flux_local/tool/selector.py +++ b/flux_local/tool/selector.py @@ -30,6 +30,8 @@ def __call__( option_string: str | None = None, ) -> None: values = values.split(",") + if not values[0]: + return try: source = git_repo.Source.from_str(values[0]) except ValueError: diff --git a/tests/tool/testdata/diff_ks_yaml_empty_sources.yaml b/tests/tool/testdata/diff_ks_yaml_empty_sources.yaml new file mode 100644 index 00000000..87fd2253 --- /dev/null +++ b/tests/tool/testdata/diff_ks_yaml_empty_sources.yaml @@ -0,0 +1,10 @@ +args: +- diff +- ks +- apps +- --path +- tests/testdata/cluster/ +- -o +- yaml +- --sources +- ""