diff --git a/lib/pure/includes/osenv.nim b/lib/pure/includes/osenv.nim index f9c076158d..bc47501215 100644 --- a/lib/pure/includes/osenv.nim +++ b/lib/pure/includes/osenv.nim @@ -1,6 +1,6 @@ # Include file that implements 'getEnv' and friends. Do not import it! -when not declared(os): +when not declared(os) and not declared(ospaths): {.error: "This is an include file for os.nim!".} from parseutils import skipIgnoreCase diff --git a/lib/pure/includes/oserr.nim b/lib/pure/includes/oserr.nim index 947bdd9a94..68ce5d95fa 100644 --- a/lib/pure/includes/oserr.nim +++ b/lib/pure/includes/oserr.nim @@ -1,6 +1,6 @@ # Include file that implements 'osErrorMsg' and friends. Do not import it! -when not declared(os): +when not declared(os) and not declared(ospaths): {.error: "This is an include file for os.nim!".} when not defined(nimscript):