mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Check for line length when scanning for local devserver url (#1566)
This commit is contained in:
@@ -30,6 +30,9 @@ func (s *stdoutScanner) Write(data []byte) (n int, err error) {
|
||||
for sc.Scan() {
|
||||
line := sc.Text()
|
||||
index := strings.Index(line, "Local:")
|
||||
if index == -1 || len(line) < 7 {
|
||||
continue
|
||||
}
|
||||
line = strings.TrimSpace(line[index+6:])
|
||||
viteServerURL := stripansi.Strip(line)
|
||||
LogGreen("Vite Server URL: %s", viteServerURL)
|
||||
|
||||
Reference in New Issue
Block a user