-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support more robust determination of the executable location #13
Comments
The new tests I added fail on macOS because the executable is the test runner when you are running tests. These tests fail with the old way of getting the executable as well. I will see if there's a way to fix that, or else I can remove the test. Either way this method of finding the executable is no worse than before in this respect, and better in the ways noted above. |
I have added 2 more PRs, based on #11
|
NOTE: the merge order matters here. For example, If we want all 3 PRs, then the merge order would be:
|
Closed by PR #16. |
Using
CommandLine.arguments[0]
is problematic for the case where the executable is run via a relative rather than absolute path, or when it is run viaPATH
. This causes problems loading config files in Bluemix.Bundle.main.executableURL
and friends offer a more robust solution is my testing. However, it is not yet supported on Linux Foundation. However,URL(fileURLWithPath: "/proc/self/exe").resolvingSymlinksInPath()
provides a fallback for Linux.The text was updated successfully, but these errors were encountered: