-
Notifications
You must be signed in to change notification settings - Fork 51
Remove swiftly from the path during proxying #311
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
Conversation
Retaining swiftly in the path increases the probability that a tool might run the proxy again, resulting in circularities. Also, tools will locate programs in the path to try and find adjacent toolchain files that cannot be discovered in the swiftly bin directory. Remove the swiftly bin directory from the path when proxying to help improve the experience with other tools.
…t they need from argv[0]
…the selected toolchain
@swift-ci test macOS |
@swift-ci test macOS |
Sources/SwiftlyCore/Platform.swift
Outdated
var newPath = newEnv["PATH"] ?? "" | ||
if !newPath.hasPrefix(tcPath.path + ":") { | ||
newPath = "\(tcPath.path):\(newPath)" | ||
if pathComponents.first ?? "" != tcPath.path { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably doesn't matter but do you want to remove tcPath
from the path components before prepending it, so that we're guaranteed one instance of it and its always the first entry?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I will make this change. There's two paths that we're managing here, so there might as well be only one and zero of them.
…ing it is only in the front
@swift-ci test macOS |
Retaining swiftly in the path increases the probability that a tool might run the proxy again, resulting in circularities. Also, tools will locate programs in the path to try and find adjacent toolchain files that cannot be discovered in the swiftly bin directory. Remove the swiftly bin directory from the path when proxying to help improve the experience with other tools.
Remove swiftly from the path during proxying (#311) Retaining swiftly in the path increases the probability that a tool might run the proxy again, resulting in circularities. Also, tools will locate programs in the path to try and find adjacent toolchain files that cannot be discovered in the swiftly bin directory. Remove the swiftly bin directory from the path when proxying to help improve the experience with other tools.
Retaining swiftly in the path increases the probability that a tool might run the proxy again, resulting in circularities. Also, tools will locate programs in the path to try and find adjacent toolchain files that cannot be discovered in the swiftly bin directory.
Remove the swiftly bin directory from the path when proxying to help improve the experience with other tools.
Use fully-qualified paths to the command where possible when proxying so that drivers can find their location via argv[0].