Skip to content

Commit ffaee23

Browse files
committed
Improve error message when users modify default-config.toml
#1825
1 parent 67bd7d2 commit ffaee23

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Sources/AppBundle/initAppBundle.swift

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ import Foundation
1313
}
1414
Task {
1515
if try await !reloadConfig() {
16-
check(try await reloadConfig(forceConfigUrl: defaultConfigUrl))
16+
var out = ""
17+
check(
18+
try await !reloadConfig(forceConfigUrl: defaultConfigUrl, stdout: &out),
19+
"""
20+
Can't load default config. Your installation is probably corrupted.
21+
Please don't change default-config.toml
22+
23+
\(out)
24+
""",
25+
)
1726
}
1827

1928
checkAccessibilityPermissions()

0 commit comments

Comments
 (0)