-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target Node.js 18, update dependencies #5
Conversation
const error = await t.throwsAsync(execa('./cli.js', {stdin: 'inherit'})); | ||
|
||
t.like(error, { | ||
stderr: 'Input required', | ||
exitCode: 1, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...yeah, I guess it makes sense that the action runner's shell isn't TTY lol
Does execa have a way to simulate it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but you can force Chalk to use colors even when not interactive using an environment variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 24 to 27 in 5ed811e
if (!input && process.stdin.isTTY) { | |
console.error('Input required'); | |
process.exit(1); | |
} |
It’s for this check, I’m not sure if that would help.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok. You could use a PTY, but not worth the effort. Just skip that test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this workaround worked: tommy-mitchell@a8bb159
This PR:
strip-ansi
v7.1.0)