Fix lists of paths in posix environment (#7034)
Empty paths in a colon separated list would be considered as the current directory, so have to ensure $PATH and $LD_LIBRARY_PATH are not empty before separating it with :
This commit is contained in:
parent
e23ea64c41
commit
5492190bc6
6 changed files with 7 additions and 7 deletions
|
|
@ -90,7 +90,7 @@ proc runBasicDLLTest(c, r: var TResults, cat: Category, options: string) =
|
|||
# posix relies on crappy LD_LIBRARY_PATH (ugh!):
|
||||
var libpath = getEnv"LD_LIBRARY_PATH".string
|
||||
# Temporarily add the lib directory to LD_LIBRARY_PATH:
|
||||
putEnv("LD_LIBRARY_PATH", "tests/dll:" & libpath)
|
||||
putEnv("LD_LIBRARY_PATH", "tests/dll" & (if libpath.len > 0: ":" & libpath else: ""))
|
||||
defer: putEnv("LD_LIBRARY_PATH", libpath)
|
||||
var nimrtlDll = DynlibFormat % "nimrtl"
|
||||
safeCopyFile("lib" / nimrtlDll, "tests/dll" / nimrtlDll)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue