File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -393,6 +393,13 @@ def set(key, value):
393393 targets [target ][0 ] = targets [target ][0 ].replace ("x86_64-unknown-linux-gnu" , target )
394394
395395
396+ def is_number (value ):
397+ try :
398+ float (value )
399+ return True
400+ except :
401+ return False
402+
396403# Here we walk through the constructed configuration we have from the parsed
397404# command line arguments. We then apply each piece of configuration by
398405# basically just doing a `sed` to change the various configuration line to what
@@ -406,7 +413,11 @@ def to_toml(value):
406413 elif isinstance (value , list ):
407414 return '[' + ', ' .join (map (to_toml , value )) + ']'
408415 elif isinstance (value , str ):
409- return "'" + value + "'"
416+ # Don't put quotes around numeric values
417+ if is_number (value ):
418+ return value
419+ else :
420+ return "'" + value + "'"
410421 else :
411422 raise RuntimeError ('no toml' )
412423
You can’t perform that action at this time.
0 commit comments