Skip to content

Commit c33cb5e

Browse files
authored
Merge pull request #2832 from ehuss/cwd-error
Provide a better error when CWD is not available.
2 parents cfb9fc0 + 77ba741 commit c33cb5e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/bin/rustup-init.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fn run_rustup_inner() -> Result<utils::ExitCode> {
5959

6060
// Before we do anything else, ensure we know where we are and who we
6161
// are because otherwise we cannot proceed usefully.
62-
process().current_dir()?;
62+
utils::current_dir()?;
6363
utils::current_exe()?;
6464

6565
// The name of arg0 determines how the program is going to behave

src/utils/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ pub(crate) fn make_executable(path: &Path) -> Result<()> {
475475
inner(path)
476476
}
477477

478-
pub(crate) fn current_dir() -> Result<PathBuf> {
478+
pub fn current_dir() -> Result<PathBuf> {
479479
process()
480480
.current_dir()
481481
.context(RustupError::LocatingWorkingDir)

0 commit comments

Comments
 (0)