Starship fails when %USERPROFILE%
is changed
#3526
Labels
🐛 bug
Something isn't working as expected.
%USERPROFILE%
is changed
#3526
Current Behavior
Start your preferred shell however you want (using starship), then set
%USERPROFILE%
to any path that is not a valid home directory. Curiously, when%USERPROFILE%
is set to null, or to a valid home directory that is not yours,starship
works fine. However, the following error is raised when%USERPROFILE%
is not a valid home directory.Expected Behavior
To continue to work as normal.
Additional context/Screenshots
This error is really strange. In
src/log.rs:27
,crate::utils::home_dir()
is called, which calls intodirectories_next
, which ultimately calls intodirs_sys_next
. The strange part is thatdirs_next
also callsdir_sys_next
, yet provides the correct response when%USERPROFILE%
is modified. I've cross-posted this issue over on xdg-rs/dirs#57, to hopefully get some input on why this occurs.Possible Solution
Switch to using
dirs_next
instead ofdirectories_next
.Environment
Relevant Shell Configuration
Starship Configuration
The text was updated successfully, but these errors were encountered: