56926a04499058f64b8bb58783bc233149e199b6 — Larry Clapp 11 days ago 7c197cc
ui/app: fix init() appending '' to os.Args

init() says

  args := strings.Split(extraArgs, "|")
  os.Args = append(os.Args, args...)

strings.Split says

  If s does not contain sep and sep is not empty, Split returns a slice
  of length 1 whose only element is s.

which means init() adds a blank arg to the end of os.Args when extraArgs
is empty.  This fixes that.

Signed-off-by: Larry Clapp <larry@theclapp.org>
1 files changed, 4 insertions(+), 2 deletions(-)

M ui/app/app.go
M ui/app/app.go => ui/app/app.go +4 -2
@@ 118,8 118,10 @@ }
  
  func init() {
- 	args := strings.Split(extraArgs, "|")
- 	os.Args = append(os.Args, args...)
+ 	if extraArgs != "" {
+ 		args := strings.Split(extraArgs, "|")
+ 		os.Args = append(os.Args, args...)
+ 	}
  }
  
  // DataDir returns a path to use for application-specific