Skip to content

Commit

Permalink
brix11: fix incorrect variable splitting
Browse files Browse the repository at this point in the history
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 RemedyIT#122.
  • Loading branch information
papperlapapp committed Feb 11, 2023
1 parent 4f1046c commit 956c45f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brix11/lib/brix11/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 956c45f

Please sign in to comment.