From 453c14066228be27bba64208037e57813880ca88 Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Wed, 15 Dec 2021 08:32:51 -0500 Subject: [PATCH] Fix yarn install user-agent check --- create-turbo/src/shouldUseYarn.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create-turbo/src/shouldUseYarn.ts b/create-turbo/src/shouldUseYarn.ts index 0153ae01e5548..69ef256ce1f48 100644 --- a/create-turbo/src/shouldUseYarn.ts +++ b/create-turbo/src/shouldUseYarn.ts @@ -3,8 +3,8 @@ import { execSync } from "child_process"; export function shouldUseYarn(): boolean { try { const userAgent = process.env.npm_config_user_agent; - if (userAgent) { - return Boolean(userAgent && userAgent.startsWith("yarn")); + if (userAgent && userAgent.startsWith("yarn")) { + return true; } execSync("yarnpkg --version", { stdio: "ignore" }); return true;