Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@qianlongzt
Copy link
Contributor

@qianlongzt qianlongzt force-pushed the fix-windows-symlink branch from 7b31f72 to 4ffcddc Compare June 16, 2025 08:20
@qianlongzt qianlongzt changed the title fix(shim: Windows shim symlink is file fix(shim): Windows shim symlink is file Jun 16, 2025
@qianlongzt qianlongzt changed the title fix(shim): Windows shim symlink is file fix(shim): improve symlink resolution to handle Windows file symlinks Jun 16, 2025
@qianlongzt qianlongzt marked this pull request as draft June 17, 2025 06:24
@vemoo
Copy link
Contributor

vemoo commented Jun 17, 2025

I also found this issue, but my fix was bit diferent:
vemoo@b311713

I don't think it makes sense using or there because on linux it should always be a link and on windows it should always be a file.

@vemoo
Copy link
Contributor

vemoo commented Jun 17, 2025

Looking at the surrounding code it seems that on windows sometimes real links are created. So maybe my solution isn't fully correct. Maybe on windows check for both file and link and on other systems only check for links?

@vemoo
Copy link
Contributor

vemoo commented Jun 17, 2025

Ah, but if a real symlink is found on windows we shouldn't do fs::read_to_string on it.

@vemoo
Copy link
Contributor

vemoo commented Jun 19, 2025

Why is this a draft PR? Should I create a PR with my proposed changes?

@qianlongzt
Copy link
Contributor Author

Since the tests failed, I will try again today.

@qianlongzt qianlongzt force-pushed the fix-windows-symlink branch 2 times, most recently from be8ece9 to d7aae51 Compare June 19, 2025 09:04
@qianlongzt qianlongzt force-pushed the fix-windows-symlink branch from d7aae51 to e8a06bf Compare June 19, 2025 13:45
@qianlongzt qianlongzt marked this pull request as ready for review June 19, 2025 14:01
@qianlongzt
Copy link
Contributor Author

qianlongzt commented Jun 19, 2025

The previous error was caused by the incorrect use of link.metadata, which follows symlinks and thus led to incorrect judgment.

@qianlongzt qianlongzt force-pushed the fix-windows-symlink branch from f46cc93 to db16899 Compare June 19, 2025 17:40
@qianlongzt qianlongzt force-pushed the fix-windows-symlink branch from c4f6ab5 to df7f5d0 Compare June 20, 2025 07:51
@qianlongzt qianlongzt changed the title fix(shim): improve symlink resolution to handle Windows file symlinks fix(shim): improve resolve_symlink for Windows Jun 20, 2025
@qianlongzt
Copy link
Contributor Author

This pr is ready to merge

@jdx jdx merged commit 22902f8 into jdx:main Jun 20, 2025
18 checks passed
@qianlongzt qianlongzt deleted the fix-windows-symlink branch June 21, 2025 02:06
jdx pushed a commit that referenced this pull request Jun 23, 2025
### πŸš€ Features

- **(registry)** add wash by [@jtakakura](https://github.com/jtakakura)
in [#5386](#5386)

### πŸ› Bug Fixes

- **(aqua)** parse consecutive pipes in aqua templates by
[@risu729](https://github.com/risu729) in
[#5385](#5385)
- **(aqua)** use versions list to install correct version by
[@risu729](https://github.com/risu729) in
[#5371](#5371)
- **(registry)** talosctl use aqua by
[@mangkoran](https://github.com/mangkoran) in
[#5348](#5348)
- **(registry)** use aqua backend for watchexec by
[@risu729](https://github.com/risu729) in
[#5390](#5390)
- **(shim)** improve resolve_symlink for Windows by
[@qianlongzt](https://github.com/qianlongzt) in
[#5361](#5361)
- add compression-zip-deflate feature on self_update crate for windows
target by [@roele](https://github.com/roele) in
[#5391](#5391)
- suppress hint on 'cargo search mise' command by
[@roele](https://github.com/roele) in
[#5400](#5400)

### πŸ“š Documentation

- Fix typo in README.md - Install mise by
[@cytsai1008](https://github.com/cytsai1008) in
[#5366](#5366)
- Document trivial task syntax by
[@JayBazuzi](https://github.com/JayBazuzi) in
[#5352](#5352)

### πŸ§ͺ Testing

- **(registry)** fix vultr test by
[@risu729](https://github.com/risu729) in
[#5372](#5372)

### πŸ“¦οΈ Dependency Updates

- update autofix-ci/action action to v1.3.2 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#5377](#5377)
- update docker/setup-buildx-action digest to e468171 by
[@renovate[bot]](https://github.com/renovate[bot]) in
[#5376](#5376)

### Chore

- update expr-lang crate to v0.3.2 by
[@risu729](https://github.com/risu729) in
[#5364](#5364)
- show curl error by [@jdx](https://github.com/jdx) in
[729aa4a](729aa4a)
- fix latest version fetch by [@jdx](https://github.com/jdx) in
[729aadc](729aadc)
- update vfox.rs crate to v1.0.3 by
[@risu729](https://github.com/risu729) in
[#5393](#5393)
- updated deps by [@jdx](https://github.com/jdx) in
[#5403](#5403)

### Ci

- use cargo info to retrieve latest mise version by
[@risu729](https://github.com/risu729) in
[#5401](#5401)

### New Contributors

- @jtakakura made their first contribution in
[#5386](#5386)
- @JayBazuzi made their first contribution in
[#5352](#5352)
- @cytsai1008 made their first contribution in
[#5366](#5366)
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

Successfully merging this pull request may close these issues.

3 participants