refactor: use getCanonicalPath instead of toRealPath

This commit is contained in:
2025-03-13 18:39:11 +00:00
parent 00df2dc546
commit 8d8df3357d
2 changed files with 2 additions and 2 deletions

View File

@@ -118,7 +118,7 @@ def compile(
_ <- logAction(s"Compilation failed for $filePath\nExit code: $code")
_ <- IO.blocking(
// Explicit println since we want this to always show without logger thread info e.t.c.
println(s"Compilation failed for ${file.toPath.toRealPath()}:\n$errorMsg")
println(s"Compilation failed for ${file.getCanonicalPath}:\n$errorMsg")
)
} yield code

View File

@@ -45,7 +45,7 @@ def formatError(error: Error)(using errorContent: String): String = {
* File of the error
*/
def formatFile(file: File): Unit = {
sb.append(s"File: ${file.toPath.toRealPath()}\n")
sb.append(s"File: ${file.getCanonicalPath}\n")
}
/** Function to format the position of an error