r = $output-&gt;{error};
if ($retry &gt; 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) {
        $retry--;
        my $response = qx/watchman watch &quot;$git_work_tree&quot;/;
        die &quot;Failed to make watchman watch &#39;$git_work_tree&#39;.\n&quot; .
            &quot;Falling back to scanning...\n&quot; if $? != 0;
        $output = $json_pkg-&gt;new-&gt;utf8-&gt;decode($response);
        $error = $output-&gt;{error};
        die &quot;Watchman: $error.\n&