From 9a560d9d4866f102a12c7e145abaed16889058a6 Mon Sep 17 00:00:00 2001 From: Joseph Petersen Date: Fri, 10 Jan 2020 01:22:27 +0100 Subject: [PATCH] fix yarn when running inside winpty --- src/installer/__tests__/__snapshots__/getScript.ts.snap | 4 ++++ src/installer/getScript.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/installer/__tests__/__snapshots__/getScript.ts.snap b/src/installer/__tests__/__snapshots__/getScript.ts.snap index 55cea3761..51f0ed7d2 100644 --- a/src/installer/__tests__/__snapshots__/getScript.ts.snap +++ b/src/installer/__tests__/__snapshots__/getScript.ts.snap @@ -68,6 +68,10 @@ fi cd \\".\\" +if command_exists winpty && test -t 1; then + exec < /dev/tty +fi + case $packageManager in \\"npm\\") run_command npx --no-install;; \\"pnpm\\") run_command pnpx --no-install;; diff --git a/src/installer/getScript.ts b/src/installer/getScript.ts index 08a4c6963..86ed4b547 100644 --- a/src/installer/getScript.ts +++ b/src/installer/getScript.ts @@ -94,6 +94,10 @@ fi cd "${relativeUserPkgDir}" +if command_exists winpty && test -t 1; then + exec < /dev/tty +fi + case $packageManager in "npm") run_command npx --no-install;; "pnpm") run_command pnpx --no-install;;