fix(wasm): finalize config without desktop shell lookup
The Node smoke test expected shaper info logs after the default logger
became errors-only. Its failure also exposed config finalization calling
an unsupported passwd lookup on wasm and returning Unexpected before
normalization completed.
Skip shell defaults on wasm, matching upstream Zig. Assert successful
config finalization and window-width clamping in the Node test. Check
shaper output directly while verifying that info logs stay suppressed.
Document these behaviors in the wasm port notes.
Test Plan:
- cargo test -p ghostty-wasm --test node (passed)
- cargo test -p ghostty-config --lib (291 passed)
- cargo clippy --target wasm32-unknown-unknown -p ghostty-wasm -- -D warnings
- cargo clippy; cargo clippy --benches; cargo clippy --tests
- cargo +nightly fmt, followed by the native Clippy checks again
- git diff --check
Related-commit: 4fb9faa667
This commit is contained in:
1 parent
62e1209b37
commit
7cec74e18b
3 files changed
+17
-4
No files matched your search
@@ -4594,7 +4594,9 @@ impl Config {
|
||||
// If we are missing either a command or home directory, we need
|
||||
// to look up defaults which is kind of expensive. We only do this
|
||||
// on desktop (and not in tests, like the Zig `builtin.is_test`).
|
||||
if !cfg!(test) && (self.command.is_none() || wd == WorkingDirectory::Home) {
|
||||
if !cfg!(any(test, target_arch = "wasm32"))
|
||||
&& (self.command.is_none() || wd == WorkingDirectory::Home)
|
||||
{
|
||||
self.lookup_shell_defaults(probable_cli, &mut wd)?;
|
||||
}
|
||||
wd.finalize();
|
||||
|
||||
Reference in new issue
Block a user