Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/main.rs')
| -rw-r--r-- | helix-term/src/main.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs index 22071361..f07f27d8 100644 --- a/helix-term/src/main.rs +++ b/helix-term/src/main.rs @@ -124,6 +124,10 @@ FLAGS: } else if let Some((path, _)) = args.files.first().filter(|p| p.0.is_dir()) { // If the first file is a directory, it will be the working directory unless -w was specified helix_stdx::env::set_current_working_dir(path)?; + } else if let Err(err) = std::env::current_dir() { + eprintln!("Couldn't determine the current working directory: {err}"); + eprintln!("Check that it still exists, or pass an initial directory with `--working-dir`"); + return Ok(1); } let config = match Config::load_default() { |