fix: simplify brew warning matcher

This commit is contained in:
Amin Yahyaabadi 2025-03-10 21:28:50 -07:00
parent 413acc39d5
commit f3b54ce57b
5 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -56,7 +56,7 @@ export async function installBrewPack(
// dry run to check if the package is already installed
const dryRun = execaSync(brewPath, [...args, "--dry-run"], { stdio: "pipe" })
const isAlreadyInstalled = dryRun.exitCode === 0
&& (new RegExp(`Warning: ${name}.* is already installed and up-to-date.[\\s\\S]*`)).test(dryRun.stderr)
&& (new RegExp(`${name}.* is already installed and up-to-date.[\\s\\S]*`)).test(dryRun.stderr)
if (isAlreadyInstalled) {
// if the package is already installed and up-to-date, skip the installation