From 27ed708c98a677fba12e71cb8c60f38ce7c256fb Mon Sep 17 00:00:00 2001 From: Enzo Innocenzi Date: Fri, 29 Apr 2022 16:40:19 +0200 Subject: [PATCH] fix(prettier-formatter): support per-project install --- src/Formatters/PrettierFormatter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Formatters/PrettierFormatter.php b/src/Formatters/PrettierFormatter.php index 5d4d594..34ba901 100644 --- a/src/Formatters/PrettierFormatter.php +++ b/src/Formatters/PrettierFormatter.php @@ -9,7 +9,7 @@ class PrettierFormatter implements Formatter { public function format(string $file): void { - $process = new Process(['prettier', '--write', $file]); + $process = new Process(['npx', '--yes', 'prettier', '--write', $file]); $process->run(); if (! $process->isSuccessful()) {