Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osproc.startProcess should support "not following symlinks" #23583

Open
jinwoo opened this issue May 7, 2024 · 2 comments
Open

osproc.startProcess should support "not following symlinks" #23583

jinwoo opened this issue May 7, 2024 · 2 comments

Comments

@jinwoo
Copy link

jinwoo commented May 7, 2024

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

@jinwoo
Copy link
Author

jinwoo commented May 7, 2024

This problem seems to happen when the given command is not a full path and the poUsePath is specified.

@jinwoo
Copy link
Author

jinwoo commented May 9, 2024

My workaround was to use os.findExe() with followSymlinks set to false, instead of using the poUsePath option of startProcess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant