|
|
@@ -175,10 +175,17 @@ impl DefaultSigner {
|
|
|
}
|
|
|
})
|
|
|
.map_err(|_| {
|
|
|
+ // Use the system default path in the error message instead of the configured path
|
|
|
+ let default_path = dirs_next::home_dir()
|
|
|
+ .map(|mut path| {
|
|
|
+ path.extend([".config", "solana", "id.json"]);
|
|
|
+ path.to_str().unwrap_or(&self.path).to_string()
|
|
|
+ })
|
|
|
+ .unwrap_or_else(|| self.path.clone());
|
|
|
std::io::Error::other(format!(
|
|
|
"No default signer found, run \"solana-keygen new -o {}\" to create a new \
|
|
|
one",
|
|
|
- self.path
|
|
|
+ default_path
|
|
|
))
|
|
|
})?;
|
|
|
*self.is_path_checked.borrow_mut() = true;
|