mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 23:55:39 +00:00
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>
This commit is contained in:
+4
-2
@@ -118,8 +118,10 @@ func (l Stage) String() string {
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user