[PATCH] kas-container: clear KAS_FILES before parsing command arguments

7 views
Skip to first unread message

Cedric Hombourger

unread,
Jun 26, 2025, 5:47:10 AMJun 26
to kas-...@googlegroups.com, Cedric Hombourger
The command line parser takes each file argument and appends it
to its global KAS_FILES variable. If that variable happens to
be set/exported in the calling shell, kas will be called with
a space-separated list of kas files (when : is expected when
multiple files should be parsed). Since KAS_FILES is not an
input/documented environment variable [1], clear it before we
parse the kas-container command line.

[1] https://kas.readthedocs.io/en/latest/command-line.html#environment-variables

Signed-off-by: Cedric Hombourger <cedric.h...@siemens.com>
---
kas-container | 1 +
1 file changed, 1 insertion(+)

diff --git a/kas-container b/kas-container
index 0e99898..e873588 100755
--- a/kas-container
+++ b/kas-container
@@ -454,6 +454,7 @@ done
[ -n "${KAS_CMD}" ] || usage

KAS_EXTRA_BITBAKE_ARGS=0
+KAS_FILES=

# parse kas sub-command options
while [ $# -gt 0 ] && [ $KAS_EXTRA_BITBAKE_ARGS -eq 0 ]; do
--
2.39.5

Jan Kiszka

unread,
Jun 26, 2025, 8:37:39 AMJun 26
to Cedric Hombourger, kas-...@googlegroups.com
Makes sense, applied.

Thanks,
Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center
Reply all
Reply to author
Forward
0 new messages