mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
Don't use os for Standalone (#15944)
(cherry picked from commit 1fdfa234d7)
This commit is contained in:
committed by
narimiran
parent
afedd5ee24
commit
efaa55d429
@@ -53,7 +53,7 @@ import std/private/since
|
||||
import
|
||||
hashes, strutils
|
||||
|
||||
when defined(js) or defined(nimscript):
|
||||
when defined(js) or defined(nimscript) or defined(Standalone):
|
||||
{.pragma: rtlFunc.}
|
||||
else:
|
||||
{.pragma: rtlFunc, rtl.}
|
||||
@@ -301,7 +301,7 @@ proc raiseFormatException(s: string) =
|
||||
proc getValue(t: StringTableRef, flags: set[FormatFlag], key: string): string =
|
||||
if hasKey(t, key): return t.getOrDefault(key)
|
||||
# hm difficult: assume safety in taint mode here. XXX This is dangerous!
|
||||
when defined(js) or defined(nimscript):
|
||||
when defined(js) or defined(nimscript) or defined(Standalone):
|
||||
result = ""
|
||||
else:
|
||||
if useEnvironment in flags: result = getEnv(key).string
|
||||
|
||||
Reference in New Issue
Block a user