Skip to content

Don't assume program files folder locations #1456

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

Merged
merged 34 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9eaa0d9
Make ALTERNATIVE_LOCATIONS dynamic and OsString-based
EliahKagan Jul 11, 2024
98b3d90
Restyle just-changed and related code for clarity
EliahKagan Jul 11, 2024
6af59ca
Add dev dependencies for soon to be added unit test
EliahKagan Jul 11, 2024
edc1351
Start on unit test for ALTERNATIVE_LOCATIONS
EliahKagan Jul 12, 2024
5b206bc
Make ALTERNATIVE_LOCATIONS items PathBuf
EliahKagan Jul 12, 2024
99a8eb3
Do a minor simplification now that it's PathBuf
EliahKagan Jul 12, 2024
a5a5342
Revise obtain_envlessly() doc comment for clarity
EliahKagan Jul 12, 2024
5df0cf5
Improve expect and assert messages in PathsByRole::validate()
EliahKagan Jul 12, 2024
518fd27
Remove extra comment left over from before
EliahKagan Jul 12, 2024
5701145
Make PathsByRole::maybe_pf_64bit an Option<PathBuf>
EliahKagan Jul 12, 2024
95708dd
Clarify what pf_current represents
EliahKagan Jul 12, 2024
3dd1d1f
Rename PathsByRole to ProgramFilesPaths
EliahKagan Jul 12, 2024
dd1e5c8
Assert `ALTERNATIVE_LOCATIONS` count and prefixes
EliahKagan Jul 13, 2024
5258f7a
Assert that the corresponding suffixes are correct
EliahKagan Jul 13, 2024
671c476
Adjust GitBinSuffixes so uses in the test method are clearer
EliahKagan Jul 13, 2024
e9eabeb
Narrow assert_architectures fixme to just what's left
EliahKagan Jul 13, 2024
167dc14
Start implementing a helper for ALTERNATIVE_LOCATIONS
EliahKagan Jul 13, 2024
c486a7d
Fix the helper to join the `mingw*/bin` subdirs
EliahKagan Jul 13, 2024
df175bc
Rename helper; condense huge comment and move into position
EliahKagan Jul 13, 2024
00127a7
Remove a fixme that should no longer be done
EliahKagan Jul 13, 2024
1f0c3bf
Add the missing `Git` component in the suffixes
EliahKagan Jul 13, 2024
c8b2eb3
Simplify path construction and config; improve comments
EliahKagan Jul 13, 2024
4d98535
Reorder statements in alternative_locations test for clarity
EliahKagan Jul 13, 2024
de7c49f
Call fewer different things "suffixes"
EliahKagan Jul 13, 2024
e990bcd
Rename helper, write its tests (and their helpers), fix a bug
EliahKagan Jul 14, 2024
d254e62
Put the new tests in their own nested mod
EliahKagan Jul 14, 2024
98db88b
Fix test bug generating expected value on 32-bit system
EliahKagan Jul 14, 2024
15235bf
fix: Don't assume program files folder locations
EliahKagan Jul 14, 2024
8ae54e8
Add second `super::` in non-Windows `alternative_locations` test
EliahKagan Jul 14, 2024
464e0a2
Thanks clippy
EliahKagan Jul 14, 2024
76e3b28
Omit excess punctuation in `expect` messages
EliahKagan Jul 15, 2024
dea1746
Update/refine comments and do some minor cleanup
EliahKagan Jul 15, 2024
dd53408
Move `test::loc`'s `use` statements up
EliahKagan Jul 15, 2024
73ed340
refactor
Byron Jul 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 126 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions gix-path/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ home = "0.5.5"

[dev-dependencies]
tempfile = "3.3.0"

[target.'cfg(windows)'.dev-dependencies]
known-folders = "1.1.0"
windows = { version = "0.58.0", features = ["Win32_System_Threading"] }
winreg = "0.52.0"
Loading
Loading