fix: macOS bcopy conflict and Docker host binding
- Fix #11: Guard bcopy/bzero declarations with _VISUALCPP in commoninclude.h to avoid redefinition errors on macOS where <strings.h> provides them - Fix #12: Add --host flag to serve command, default 127.0.0.1 Docker now binds to 0.0.0.0 so Colima can reach the server from host - Also fix truncate() panic when n < 3
This commit is contained in:
@@ -116,6 +116,7 @@ Pipeline flags:
|
||||
|
||||
Serve flags:
|
||||
-p, --port 0 HTTP port (0 = auto-assign)
|
||||
--host 127.0.0.1 HTTP bind address (use 0.0.0.0 for Docker)
|
||||
--no-browser don't open browser automatically`)
|
||||
}
|
||||
|
||||
@@ -596,6 +597,9 @@ func truncate(s string, n int) string {
|
||||
if len(s) <= n {
|
||||
return s
|
||||
}
|
||||
if n < 3 {
|
||||
return s[:n]
|
||||
}
|
||||
return s[:n-3] + "..."
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user