We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ef7714 commit 110dad9Copy full SHA for 110dad9
src/functions.php
@@ -21,7 +21,7 @@
21
use Throwable;
22
use function Chevere\Filesystem\directoryForPath;
23
use function Chevere\Writer\streamTemp;
24
- use function Safe\getcwd;
+ use function getcwd;
25
26
/**
27
* @codeCoverageIgnore
@@ -40,11 +40,13 @@ function getXr(): XrInterface
40
try {
41
return XrInstance::get();
42
} catch (LogicException) {
43
+ $cwd = getcwd();
44
+ if ($cwd === false) {
45
+ throw new LogicException('Unable to get current working directory');
46
+ }
47
$xr = (new Xr())
48
->withConfigDir(
- directoryForPath(
- getcwd()
- )
49
+ directoryForPath($cwd)
50
);
51
52
return (new XrInstance($xr))::get();
0 commit comments