Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cli): Improve error message for attempting genesis with non-empty config dir #4987

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Alex6323
Copy link
Contributor

@Alex6323 Alex6323 commented Jan 23, 2025

Description of change

Ports the error message of MystenLabs/sui#19487

How the change was tested

Ran iota start with a non-empty config directory by renaming network.yaml to something else, which triggers that code path.

Links to any relevant issues

fixes #4926

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
apps-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2025 9:25am
rebased-explorer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2025 9:25am
wallet-dashboard 🛑 Canceled (Inspect) Jan 31, 2025 9:25am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
apps-ui-kit ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2025 9:25am

@iota-ci iota-ci added dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group. labels Jan 23, 2025
@@ -727,7 +727,8 @@ async fn start(
remote_migration_snapshots,
delegator,
)
.await?;
.await
.map_err(|_| anyhow!("Cannot run genesis with non-empty IOTA config directory: {}.\n\nIf you are trying to run a local network without persisting the data (so a new genesis that is randomly generated and will not be saved once the network is shut down), use --force-regenesis flag.\nIf you are trying to persist the network data and start from a new genesis, use iota genesis --help to see how to generate a new genesis.", config.display()))?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we format this pls?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 0ca1822

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-tools Issues related to the Developer Tools Team sc-platform Issues related to the Smart Contract Platform group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore(iota): better error message when a iota config folder exists without genesis metadata
4 participants