Apply suggestion from @greptile-apps[bot]

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
pull/18380/head
Dax 2026-03-19 23:29:18 -04:00 committed by GitHub
parent 205affa0eb
commit 20249bb723
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -71,8 +71,11 @@ export const prettier: Info = {
devDependencies?: Record<string, string>
}>(item)
if (json.dependencies?.prettier || json.devDependencies?.prettier) {
return [await Npm.which("prettier"), "--write", "$FILE"]
}
if (json.dependencies?.prettier || json.devDependencies?.prettier) {
const bin = await Npm.which("prettier").catch(() => null)
if (!bin) return false
return [bin, "--write", "$FILE"]
}
}
return false
},