Merge pull request #3908 from halseth/mobile-trim-spaces
[mobile] trim arg spaces before comparison
This commit is contained in:
commit
fd75f29480
@ -29,12 +29,15 @@ func Start(extraArgs string, unlockerReady, rpcReady Callback) {
|
|||||||
// arguments.
|
// arguments.
|
||||||
var splitArgs []string
|
var splitArgs []string
|
||||||
for _, a := range strings.Split(extraArgs, "--") {
|
for _, a := range strings.Split(extraArgs, "--") {
|
||||||
|
// Trim any whitespace space, and ignore empty params.
|
||||||
|
a := strings.TrimSpace(a)
|
||||||
if a == "" {
|
if a == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// Finally we prefix any non-empty string with --, and trim
|
|
||||||
// whitespace to mimic the regular command line arguments.
|
// Finally we prefix any non-empty string with -- to mimic the
|
||||||
splitArgs = append(splitArgs, strings.TrimSpace("--"+a))
|
// regular command line arguments.
|
||||||
|
splitArgs = append(splitArgs, "--"+a)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the extra arguments to os.Args, as that will be parsed during
|
// Add the extra arguments to os.Args, as that will be parsed during
|
||||||
|
Loading…
Reference in New Issue
Block a user