Skip to content

Commit 2761eb7

Browse files
committed
canonicalise problem file path
1 parent 9713cc8 commit 2761eb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Exception/ProblemFileDoesNotExistException.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ class ProblemFileDoesNotExistException extends \RuntimeException
88
{
99
public static function fromFile(string $file): self
1010
{
11-
return new self("Exercise problem file: '$file' does not exist or is not readable");
11+
return new self(sprintf(
12+
'Exercise problem file: "%s" does not exist or is not readable',
13+
canonicalise_path($file)
14+
));
1215
}
1316
}

0 commit comments

Comments
 (0)