mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[v1] better arg passing to wails serve
This commit is contained in:
parent
5302ce57db
commit
d20155a03b
1 changed files with 11 additions and 1 deletions
|
|
@ -477,7 +477,17 @@ func ServeProject(projectOptions *ProjectOptions, logger *Logger) error {
|
|||
logger.Yellow("Serving Application: " + location)
|
||||
var args []string
|
||||
if len(os.Args) > 2 {
|
||||
args = os.Args[2:]
|
||||
foundArgSep := false
|
||||
for index, arg := range os.Args[2:] {
|
||||
if arg == "--" {
|
||||
foundArgSep = true
|
||||
continue
|
||||
}
|
||||
if foundArgSep {
|
||||
args = os.Args[index:]
|
||||
break
|
||||
}
|
||||
}
|
||||
logger.Yellow("Passing arguments: %+v", args)
|
||||
}
|
||||
cmd := exec.Command(location, args...)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue