From 956c45fa8b9d7891657e5fb6ce84effb48af1452 Mon Sep 17 00:00:00 2001 From: Andreas Engel Date: Sat, 11 Feb 2023 15:00:32 +0100 Subject: [PATCH] brix11: fix incorrect variable splitting Variable values containing an equal sign can't be used with the -D option due to incorrect splitting: $ bin/brix11 -D A=B=C environment export A=B Output after applying the fix: $ bin/brix11 -D A=B=C environment export A=B=C This fixes #122. --- brix11/lib/brix11/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brix11/lib/brix11/base.rb b/brix11/lib/brix11/base.rb index cd502ff..6d5c81e 100644 --- a/brix11/lib/brix11/base.rb +++ b/brix11/lib/brix11/base.rb @@ -158,7 +158,7 @@ def self.init_optparser 'Define an additional environment variable for BRIX11 commands.', 'Separate (optional) value by \'=\' like VAR=VAL. By default value will be \'1\'.', 'Supports \$VAR and \${VAR}-form variable expansion.') { |v| - _var, _val = v.split('=') + _var, _val = v.split('=', 2) (options.user_config.user_environment ||= {})[_var] = _val || '1' } opts.on('-x', '--crossbuild',