Skip to content

Commit 110dad9

Browse files
committed
drop safe
1 parent 0ef7714 commit 110dad9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/functions.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use Throwable;
2222
use function Chevere\Filesystem\directoryForPath;
2323
use function Chevere\Writer\streamTemp;
24-
use function Safe\getcwd;
24+
use function getcwd;
2525

2626
/**
2727
* @codeCoverageIgnore
@@ -40,11 +40,13 @@ function getXr(): XrInterface
4040
try {
4141
return XrInstance::get();
4242
} catch (LogicException) {
43+
$cwd = getcwd();
44+
if ($cwd === false) {
45+
throw new LogicException('Unable to get current working directory');
46+
}
4347
$xr = (new Xr())
4448
->withConfigDir(
45-
directoryForPath(
46-
getcwd()
47-
)
49+
directoryForPath($cwd)
4850
);
4951

5052
return (new XrInstance($xr))::get();

0 commit comments

Comments
 (0)