diff options
author | Andy Davidoff <disruptek@users.noreply.github.com> | 2020-03-23 06:08:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 11:08:37 +0100 |
commit | fa06203e90d9bb9211d0b6b9726fc9f2c5dc80ad (patch) | |
tree | b991c4dfba8f51659cbcdc45b104964260007cd7 /lib | |
parent | 7ee08b8cf6e98312986c821119e4c779505ed6aa (diff) | |
download | Nim-fa06203e90d9bb9211d0b6b9726fc9f2c5dc80ad.tar.gz |
add error for missing commandLineParams (#13719)
* add error for missing commandLineParams * fixup * rewrite
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/os.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index d54dc5b83..fda482bc3 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -2770,6 +2770,10 @@ when declared(paramCount) or defined(nimdoc): result = @[] for i in 1..paramCount(): result.add(paramStr(i)) +else: + proc commandLineParams*(): seq[TaintedString] {.error: + "commandLineParams() unsupported by dynamic libraries".} = + discard when not weirdTarget and (defined(freebsd) or defined(dragonfly)): proc sysctl(name: ptr cint, namelen: cuint, oldp: pointer, oldplen: ptr csize_t, |