mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-28 07:59:02 +01:00
SERVER-17730 Allow selection of non-posix shlex mode for Variables
This commit is contained in:
parent
7b46b1c860
commit
91de99a737
12
SConstruct
12
SConstruct
@ -333,9 +333,19 @@ add_option('cache-dir',
|
||||
"Specify the directory to use for caching objects if --cache is in use",
|
||||
1, False, default="$BUILD_ROOT/scons/cache")
|
||||
|
||||
variable_parse_mode_choices=['auto', 'posix', 'other']
|
||||
add_option('variable-parse-mode',
|
||||
"Select which parsing mode is used to interpret command line variables",
|
||||
1, False,
|
||||
type='choice', default=variable_parse_mode_choices[0],
|
||||
choices=variable_parse_mode_choices)
|
||||
|
||||
# Setup the command-line variables
|
||||
def variable_shlex_converter(val):
|
||||
return shlex.split(val)
|
||||
parse_mode = get_option('variable-parse-mode')
|
||||
if parse_mode == 'auto':
|
||||
parse_mode = 'other' if windows else 'posix'
|
||||
return shlex.split(val, posix=(parse_mode == 'posix'))
|
||||
|
||||
def variable_arch_converter(val):
|
||||
arches = {
|
||||
|
Loading…
Reference in New Issue
Block a user