Skip to content

Commit 9efa9d1

Browse files
authored
Merge pull request #1028 from drbyte/patch-1
Force removal of orphaned valet.sock file
2 parents cd930ed + dd17bb9 commit 9efa9d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/Valet/PhpFpm.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ function useVersion($version, $force = false)
202202

203203
$this->stopRunning();
204204

205+
// remove any orphaned valet.sock files that PHP didn't clean up due to version conflicts
206+
$this->files->unlink(VALET_HOME_PATH.'/valet.sock');
207+
$this->cli->quietly('sudo rm ' . VALET_HOME_PATH.'/valet.sock');
208+
205209
// ensure configuration is correct and start the linked version
206210
$this->install();
207211

0 commit comments

Comments
 (0)