chore(cli): Replace node-pty with simple interactive process#55
chore(cli): Replace node-pty with simple interactive process#55jsteinich wants to merge 4 commits intoopen-constructs:mainfrom
Conversation
Signed-off-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
| import { EOL } from "os"; | ||
| import { spawnPty } from "./pty-process"; | ||
|
|
||
| interface PtySpawnConfig { |
There was a problem hiding this comment.
This was effectively a duplicate interface, so just importing it's replacement.
| timeout?: number, | ||
| ) => Promise<string>; | ||
| } => { | ||
| let disposables: IDisposable[] = []; |
There was a problem hiding this comment.
I don't believe this is necessary any more.
| const child = crossSpawn("cdktn", ["watch", "--auto-approve"], { | ||
| env: this.env, | ||
| cols: 80, | ||
| rows: 60, |
There was a problem hiding this comment.
These aren't supported any more as there isn't a pty
|
Since CDKTF was already using it (and thus CDKTN as well), this is fine in the short to medium term. Long term I'm less sure because I'm not completely sure which parts of
|
I used it here primarily because it was used elsewhere in the project, but I do suspect that some of the cross platform issues do come up. At least of the portion of the Windows tests are currently disabled in CI. Would be nice to have them running before attempting to move away from |
|
Sounds good. Dropping |
Related issue
Fixes #4
Description
inheritoption forstdinpty-processwrapper with newinteractive-processwrappernode-ptyusage withcross-spawnusagenode-ptyChecklist