Nim
Nim copied to clipboard
osproc.startProcess should support "not following symlinks"
Description
Some tools behave differently depending on by which name they are being invoked. For example, when vim
is invoked via the view
symlink, it opens in a read-only mode.
startProcess
seems to always follow the symlink of the given command and use the actual executable instead of the originally given name when given a symlink as the command. So we can't control the behavior of the invoked command using the symlink names.
There should be a way to tell it to not follow the symlink. Maybe create a new enum value for ProcessOption
.
Nim Version
2.0.4
Current Output
No response
Expected Output
No response
Possible Solution
No response
Additional Information
No response
This problem seems to happen when the given command is not a full path and the poUsePath
is specified.
My workaround was to use os.findExe()
with followSymlinks
set to false, instead of using the poUsePath
option of startProcess
.