From 341a4510643a7703827efeeb415cffc2fe245418 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Fri, 6 Dec 2019 14:50:53 -0500 Subject: [PATCH] Delay pbcopy of ngrok URL to wait for service startup Fixes #868 --- cli/Valet/Ngrok.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cli/Valet/Ngrok.php b/cli/Valet/Ngrok.php index 7f2ff9b0e..1b9636b0f 100644 --- a/cli/Valet/Ngrok.php +++ b/cli/Valet/Ngrok.php @@ -16,6 +16,9 @@ class Ngrok */ function currentTunnelUrl($domain = null) { + // wait a second for ngrok to start before attempting to find available tunnels + sleep(1); + return retry(20, function () use ($domain) { $body = Request::get($this->tunnelsEndpoint)->send()->body;