From 673318cf57e5b0675fcd7bb1832eec68d1f6f490 Mon Sep 17 00:00:00 2001 From: Erik Berg Date: Thu, 11 Aug 2022 12:24:10 +0200 Subject: [PATCH] make sure we quote extra_kernel_options argparse will remove quotations, breaking extra_kernel_options and inspector_extra_kernel_options when more than one option is used, e.g. --extra-vars extra_kernel_options="console=tty1 console=ttyS0,115200n8" Change-Id: I324e1681303115162656f39d7b6cd60a3e717b9f --- bifrost/cli.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bifrost/cli.py b/bifrost/cli.py index 7e6e9f96b..7efc6d8ca 100644 --- a/bifrost/cli.py +++ b/bifrost/cli.py @@ -50,9 +50,16 @@ def log(*message, only_if=True): def process_extra_vars(extra_vars): for item in extra_vars: + + # argparse removes quotes, just add quotes for these vars + if 'extra_kernel_options=' in item: + key, value = item.split('=', 1) + item = key + '="' + value + '"' + if item.startswith('@'): # Make sure relative paths still work item = '@' + os.path.abspath(item[1:]) + yield ('-e', item)