From 887629a00ebe96da6e12df4ce520528e62e29c8a Mon Sep 17 00:00:00 2001 From: AgentEnder Date: Fri, 26 Apr 2024 15:31:36 -0400 Subject: [PATCH] fix(core): prevent device status report from being printed during pty execution --- packages/nx/src/native/pseudo_terminal/pseudo_terminal.rs | 3 ++- packages/nx/src/utils/command-line-utils.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nx/src/native/pseudo_terminal/pseudo_terminal.rs b/packages/nx/src/native/pseudo_terminal/pseudo_terminal.rs index d30ff76a04a9f4..29c87a41118f05 100644 --- a/packages/nx/src/native/pseudo_terminal/pseudo_terminal.rs +++ b/packages/nx/src/native/pseudo_terminal/pseudo_terminal.rs @@ -81,7 +81,8 @@ pub fn create_pseudo_terminal() -> napi::Result { let quiet = quiet_clone.load(Ordering::Relaxed); trace!("Quiet: {}", quiet); if !quiet { - if stdout.write_all(&buf[0..len]).is_err() { + let content = String::from_utf8_lossy(&buf[0..len]).replace("\x1B[6n", ""); + if stdout.write_all(content.as_bytes()).is_err() { break; } else { let _ = stdout.flush(); diff --git a/packages/nx/src/utils/command-line-utils.ts b/packages/nx/src/utils/command-line-utils.ts index 1208c6c51b1d58..c6241de5f809b0 100644 --- a/packages/nx/src/utils/command-line-utils.ts +++ b/packages/nx/src/utils/command-line-utils.ts @@ -39,7 +39,7 @@ export interface NxArgs { } export function createOverrides(__overrides_unparsed__: string[] = []) { - let overrides = + let overrides: Record = yargsParser(__overrides_unparsed__, { configuration: { 'camel-case-expansion': false,