1 Commits
Author SHA1 Message Date
sneak f06b49459d Write the apps snapshot in config init only on macOS (closes #408)
check / check (push) Failing after 22m20s
`config init` wrote an `apps` snapshot of `/Applications` on every
system. That directory exists only on macOS, so on Linux the first
`snapshot create` stopped on it unless `--skip-errors` was given.

`defaultConfigText` takes the operating system name and returns the
file with the `apps` snapshot and its comment only for `darwin`;
`config init` passes `runtime.GOOS`. The macOS file is unchanged byte
for byte.

Model: opus-5-5
2026-11-10 20:23:53 +00:00
+1 -1
View File
@@ -21,7 +21,7 @@ func TestDefaultConfigParsesOnMacOS(t *testing.T) {
var cfg config.Config
err := yaml.Unmarshal([]byte(defaultConfigText(macOS)), &cfg)
err := yaml.Unmarshal([]byte(defaultConfigText("darwin")), &cfg)
if err != nil {
t.Fatalf("default config template is not valid YAML: %v", err)
}