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

Convert UNC path to local path to satisfy install script on Windows #79344

Merged
merged 1 commit into from
Nov 28, 2020

Conversation

JRF63
Copy link
Contributor

@JRF63 JRF63 commented Nov 23, 2020

mkdir with the -p flag attempts to create //? if passed a UNC path. This fails on both MSYS2 and Git Bash.

The UNC paths come from canonicalizing the install prefix path. mkdir -p gets invoked on the install script.

@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 23, 2020
@JRF63 JRF63 changed the title Convert UNC path to local path to satisfy mkdir -p on Windows Convert UNC path to local path to satisfy install script on Windows Nov 23, 2020
@JRF63 JRF63 force-pushed the fix_install_script_win branch from 1cdeba0 to 6b47920 Compare November 23, 2020 14:38
@Mark-Simulacrum
Copy link
Member

@bors r+

I'm not sure this is quite the right fix, but I think it's not wrong. In theory we should investigate these shell scripts more -- it seems like there should be a way to fix them to support these paths.

@bors
Copy link
Contributor

bors commented Nov 28, 2020

📌 Commit 6b47920 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 28, 2020
@JRF63
Copy link
Contributor Author

JRF63 commented Nov 28, 2020

Manually creating each parent directory instead of using -p flag would work. For what it's worth, this also makes change_drive consistently convert a C: since that function assumes the drive letter is at the start.

This doesn't seem hard to fix on mkdir itself but I found mention of this bug dated 10 years ago. I think I'll try to track it down and do PR at least on MSYS2 so we can revert this (if this gets merged).

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 28, 2020
…as-schievink

Rollup of 10 pull requests

Successful merges:

 - rust-lang#78086 (Improve doc for 'as _')
 - rust-lang#78853 (rustc_parse: fix ConstBlock expr span)
 - rust-lang#79234 (Resolve typedefs in HashMap gdb/lldb pretty-printers)
 - rust-lang#79344 (Convert UNC path to local path to satisfy install script on Windows)
 - rust-lang#79383 (Fix bold code formatting in keyword docs)
 - rust-lang#79460 (Remove intermediate vectors from `add_bounds`)
 - rust-lang#79474 (Change comments on types to doc-comments)
 - rust-lang#79476 (Sync rustc_codegen_cranelift)
 - rust-lang#79478 (Expand docs on Peekable::peek_mut)
 - rust-lang#79486 (Slightly improve code samples in E0591)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f4301a2 into rust-lang:master Nov 28, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants