comparison rust/hg-core/src/utils.rs @ 46483:2845892dd489

rust: Parse system and user configuration CLI `--config` argument parsing is still missing, as is per-repo config Differential Revision: https://phab.mercurial-scm.org/D9961
author Simon Sapin <simon.sapin@octobus.net>
date Thu, 04 Feb 2021 13:16:21 +0100
parents ca3f73cc3cf4
children a25033eb43b5
comparison
equal deleted inserted replaced
46482:39128182f04e 46483:2845892dd489
182 std::env::current_dir().map_err(|error| HgError::IoError { 182 std::env::current_dir().map_err(|error| HgError::IoError {
183 error, 183 error,
184 context: IoErrorContext::CurrentDir, 184 context: IoErrorContext::CurrentDir,
185 }) 185 })
186 } 186 }
187
188 pub fn current_exe() -> Result<std::path::PathBuf, HgError> {
189 std::env::current_exe().map_err(|error| HgError::IoError {
190 error,
191 context: IoErrorContext::CurrentExe,
192 })
193 }