Dynlib fix for status-go integration (#97)

* Dynlib fix as suggested in https://github.com/status-im/nim-confutils/issues/31

* Update confutils.nim

* Declare empty commandLineParams if the standard one is not declared.

---------

Co-authored-by: Jacek Sieka <arnetheduck@gmail.com>
This commit is contained in:
Vit∀ly Vlasov 2024-01-25 14:18:50 +02:00 committed by GitHub
parent 7217854b60
commit fa6e9b09e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -884,6 +884,12 @@ func constructEnvKey*(prefix: string, key: string): string {.raises: [].} =
except ValueError as err:
raiseAssert "strformat.`&` failed: " & err.msg
# On Posix there is no portable way to get the command
# line from a DLL and thus the proc isn't defined in this environment.
# See https://nim-lang.org/docs/os.html#commandLineParams
when not declared(commandLineParams):
proc commandLineParams(): seq[string] = discard
proc loadImpl[C, SecondarySources](
Configuration: typedesc[C],
cmdLine = commandLineParams(),