Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ beforeEach(() => {
});

describe('SHELL_HOOKS_PLUGIN_SOURCE', () => {
it('hides the console window for asynchronous hook commands', () => {
expect(SHELL_HOOKS_PLUGIN_SOURCE).toMatch(
/spawn\("sh",\s*\["-c", command\],[\s\S]*?windowsHide:\s*true/,
);
});

it('exports an async factory returning flat dotted-key handlers', async () => {
const hooks = await loadHooks(['UserPromptSubmit']);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ function execCommandAsync(
env: { ...process.env, ...env },
stdio: ["pipe", "ignore", "ignore"],
detached: true,
windowsHide: true,
});
// A ChildProcess or stdin 'error' with no listener is an UNHANDLED error
// event, which throws inside the host OpenCode process. Stop is configured
Expand Down
Loading