locale: remove default value for local dev env

I commented this out to test something locally and it compiles & runs
fine on macOS with Xcode. Looks like it's not needed anymore.
This commit is contained in:
Thorsten Ball
2023-07-19 06:46:01 +02:00
parent 4b48d42a07
commit 5472d03832

View File

@ -65,20 +65,6 @@ fn localeIsValid(locale: []const u8) bool {
/// This sets the LANG environment variable based on the macOS system /// This sets the LANG environment variable based on the macOS system
/// preferences selected locale settings. /// preferences selected locale settings.
fn setLangFromCocoa() void { fn setLangFromCocoa() void {
// Unknown Zig bug where in debug mode we can't pull the cocoa
// value without crashing so we just force it to en_US.UTF-8.
// Debug mode is only used for testing so to avoid this, devs can
// just set LANG manually!
if (builtin.mode == .Debug) {
log.warn("in debug mode, we always set LANG to en_US.UTF-8 if not set", .{});
if (setenv("LANG", "en_US.UTF-8", 1) < 0) {
log.err("error setting locale env var", .{});
return;
}
return;
}
const pool = objc.AutoreleasePool.init(); const pool = objc.AutoreleasePool.init();
defer pool.deinit(); defer pool.deinit();