summary refs log tree commit diff stats
path: root/lib/std/private/ospaths2.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-08-12 00:24:46 +0800
committerGitHub <noreply@github.com>2023-08-11 18:24:46 +0200
commit3f7e1d7daadf4002da1a155d7b98ff7fcca9e2fa (patch)
treeca733c386244be34e2d0e53b8f79d4e2844b8794 /lib/std/private/ospaths2.nim
parent48da472dd2e625d2d794907afd33a4a153fa2dc1 (diff)
downloadNim-3f7e1d7daadf4002da1a155d7b98ff7fcca9e2fa.tar.gz
replace `doAssert false` with `raiseAssert` in lib, which works better with strictdefs (#22458)
Diffstat (limited to 'lib/std/private/ospaths2.nim')
-rw-r--r--lib/std/private/ospaths2.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/private/ospaths2.nim b/lib/std/private/ospaths2.nim
index 18a01b104..421def62b 100644
--- a/lib/std/private/ospaths2.nim
+++ b/lib/std/private/ospaths2.nim
@@ -259,7 +259,7 @@ proc isAbsolute*(path: string): bool {.rtl, noSideEffect, extern: "nos$1", raise
     # This works around the problem for posix, but Windows is still broken with nim js -d:nodejs
     result = path[0] == '/'
   else:
-    doAssert false # if ever hits here, adapt as needed
+    raiseAssert "unreachable" # if ever hits here, adapt as needed
 
 when FileSystemCaseSensitive:
   template `!=?`(a, b: char): bool = a != b
@@ -859,7 +859,7 @@ when not defined(nimscript):
       {.emit: "`ret` = process.cwd();".}
       return $ret
     elif defined(js):
-      doAssert false, "use -d:nodejs to have `getCurrentDir` defined"
+      raiseAssert "use -d:nodejs to have `getCurrentDir` defined"
     elif defined(windows):
       var bufsize = MAX_PATH.int32
       var res = newWideCString("", bufsize)