Skip to content

v3.0: fix: Show correct default path in signer error messages (backport of #7849)#7867

Closed
mergify[bot] wants to merge 1 commit intov3.0from
mergify/bp/v3.0/pr-7849
Closed

v3.0: fix: Show correct default path in signer error messages (backport of #7849)#7867
mergify[bot] wants to merge 1 commit intov3.0from
mergify/bp/v3.0/pr-7849

Conversation

@mergify
Copy link
Copy Markdown

@mergify mergify Bot commented Sep 3, 2025

Problem

When Solana CLI configuration contains an invalid keypair_path, error messages suggest creating new keypairs at the misconfigured location instead of the user's actual default directory. This leads to confusion and keypairs being created in wrong locations (e.g., /home/sol/identity/id.json instead of $HOME/.config/solana/id.json).

Solution

Modified error message generation in DefaultSigner::path() to always suggest the system default path (~/.config/solana/id.json) based on the user's actual home directory, regardless of any misconfigured paths in config files.

@KirillLykov can you check this, closes #6637


This is an automatic backport of pull request #7849 done by Mergify.

Fixes the problem with Solana CLI when configuration contains an invalid `keypair_path`: error messages suggest creating new keypairs at the misconfigured location instead of the user's actual default directory. This leads to confusion and keypairs being created in wrong locations.
Modified error message generation in `efaultSigner::path()` to always suggest the system default path based on the user's actual home directory, regardless of any misconfigured paths in config files.

(cherry picked from commit 7c3e9e7)

# Conflicts:
#	clap-utils/src/keypair.rs
#	clap-v3-utils/src/keypair.rs
@mergify mergify Bot added the conflicts label Sep 3, 2025
@mergify mergify Bot requested a review from a team as a code owner September 3, 2025 19:19
@mergify mergify Bot added the conflicts label Sep 3, 2025
@mergify
Copy link
Copy Markdown
Author

mergify Bot commented Sep 3, 2025

Cherry-pick of 7c3e9e7 has failed:

On branch mergify/bp/v3.0/pr-7849
Your branch is up to date with 'origin/v3.0'.

You are currently cherry-picking commit 7c3e9e745.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   Cargo.lock
	modified:   clap-utils/Cargo.toml
	modified:   clap-v3-utils/Cargo.toml
	modified:   programs/sbf/Cargo.lock

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   clap-utils/src/keypair.rs
	both modified:   clap-v3-utils/src/keypair.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@t-nelson
Copy link
Copy Markdown

t-nelson commented Sep 3, 2025

i think this one is wrong too #7849 (comment)

also merge conflicts need resolved

@KirillLykov KirillLykov closed this Sep 4, 2025
@yihau yihau deleted the mergify/bp/v3.0/pr-7849 branch December 5, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants