Fix undefined variable $packagePath in mix:watch error (#485)

When the package is not present in package.json, the correct error is not thrown because $packagePath not exists.

Co-authored-by: Luke Towers <github@luketowers.ca>
This commit is contained in:
Marco 2022-05-09 04:48:19 +02:00 committed by GitHub
parent 3fbc50f06a
commit ac130c462c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ class MixWatch extends MixCompile
$relativeMixJsPath = $package['mix'];
if (!$this->canCompilePackage($relativeMixJsPath)) {
$this->error(
sprintf('Unable to watch "%s", %s was not found in the package.json\'s workspaces.packages property. Try running mix:install first.', $name, $packagePath)
sprintf('Unable to watch "%s", %s was not found in the package.json\'s workspaces.packages property. Try running mix:install first.', $name, $relativeMixJsPath)
);
return 1;
}