Some bug fixes:
- logging: LogToFile shadowed the package-level fileLogger, so IsFileLogger was always false and Shutdown never closed the file - logging: replace IsJSONHandler's unsafe reflection into slog internals with a *slog.JSONHandler type check - cli: fail if the log file can't be opened instead of silently logging to the terminal; return the log shutdown error from Finish - build.sh: -X flags used the wrong module path, so the version, build time and commit were never stamped
This commit is contained in:
1 parent
399eccf2de
commit
dcb714dc19
7 files changed
+24
-45
No files matched your search
@@ -32,7 +32,7 @@ func initDir(t *testing.T, env []string, config string) string {
|
||||
|
||||
func writeFile(t *testing.T, path, contents string) {
|
||||
t.Helper()
|
||||
if err := os.WriteFile(path, []byte(contents), 0o644); err != nil {
|
||||
if err := os.WriteFile(path, []byte(contents), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user