Skip to content
Open
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
5 changes: 5 additions & 0 deletions .changeset/sour-doors-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clack/core": patch
---

Removes Windows-specific raw mode handling in `block()` function
5 changes: 1 addition & 4 deletions packages/core/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import { isActionKey } from './settings.js';
export * from './settings.js';
export * from './string.js';

const isWindows = globalThis.process.platform.startsWith('win');

export const CANCEL_SYMBOL = Symbol('clack:cancel');

export function isCancel(value: unknown): value is symbol {
Expand Down Expand Up @@ -73,8 +71,7 @@ export function block({
input.off('keypress', clear);
if (hideCursor) output.write(cursor.show);

// Prevent Windows specific issues: https://github.com/bombshell-dev/clack/issues/176
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

won't we be reintroducing this bug? 👀

this must've been added for a reason

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it’s tough to tell because i can’t test this locally. I’m thinking we might wanna add a windows CI workflow to cover this and future issues.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@43081j were you able to test this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry i lost track of this one, ill give it a go this evening 👍

if (input instanceof ReadStream && input.isTTY && !isWindows) {
if (input instanceof ReadStream && input.isTTY) {
input.setRawMode(false);
}

Expand Down
Loading