-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
move toolchain: preserve .exe extension for windows #16218
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
let platform = detect_platform(&root, compiler_version, &dest_canonical_path)?; | ||
if platform == "windows-x86_64" { | ||
dest_canonical_binary.push(CANONICAL_WIN_BINARY_NAME); | ||
} else { | ||
dest_canonical_binary.push(CANONICAL_UNIX_BINARY_NAME); | ||
} | ||
|
||
if !dest_canonical_binary.exists() { | ||
// Check the platform and proceed if we can download a binary. If not, the user should follow error instructions to sideload the binary. | ||
let mut platform = detect_platform(&root, compiler_version, &dest_canonical_binary)?; |
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.
With this change we have to detect_platform
before checking if the binary exists.
There's a method here close to the previous check where we can do "does binary exist?" by checking whether either sui
or sui.exe
exists. But with this PR though, we have to reuse knowledge of the platform to also invoke either sui
or sui.exe
depending on the platform. So I think it's more natural to get the platform
and have the logic case out on that, than guess and persist sui
vs sui.exe
5ee9f87
to
c8b0866
Compare
c8b0866
to
f398546
Compare
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.
👍
Description
Toolchain versioned builds on windows will use
sui.exe
and invokesui.exe
rather than justsui
so that windows users don't need to strip the.exe
extension in order for things to work.(from #16182 (comment))
Test Plan
👀
If your changes are not user-facing and do not break anything, you can skip the following section. Otherwise, please briefly describe what has changed under the Release Notes section.
Type of Change (Check all that apply)
Release notes