(base: &Path, file: &str)
| 246 | } |
| 247 | |
| 248 | pub fn resolve_path(base: &Path, file: &str) -> PathBuf { |
| 249 | let file = PathBuf::from(shellexpand::tilde(file).into_owned()); |
| 250 | if file.is_absolute() { |
| 251 | file |
| 252 | } else { |
| 253 | base.join(file) |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | pub fn get_dfx_hsm_pin() -> Result<String, String> { |
| 258 | std::env::var("DFX_HSM_PIN").or_else(|_| { |