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

cli: Add ability to force init and new commands via cli #2698

Merged
merged 16 commits into from
Nov 11, 2023

Conversation

johnanthos
Copy link
Contributor

@johnanthos johnanthos commented Nov 10, 2023

Problem

Currently there's no way to force init and new commands via the cli. This is described at #2669.

Summary of changes

  • Add a --force argument to the init command
  • Update tests with new flag
  • Update changelog

Fixes #2669

Copy link

vercel bot commented Nov 10, 2023

@johnanthos is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Thank you, this is looking good for anchor init but #2669 also mentions anchor new, could you add it as well?

CHANGELOG.md Outdated Show resolved Hide resolved
cli/src/lib.rs Outdated Show resolved Hide resolved
@johnanthos
Copy link
Contributor Author

@acheroncrypto thank you so much for the quick review and feedback. On it.

johnanthos and others added 4 commits November 10, 2023 10:53
Co-authored-by: acheron <98934430+acheroncrypto@users.noreply.github.com>
Co-authored-by: acheron <98934430+acheroncrypto@users.noreply.github.com>
@johnanthos johnanthos changed the title cli: Add ability to force init cli: Add ability to force init and new commands via cli Nov 10, 2023
@johnanthos
Copy link
Contributor Author

@acheroncrypto added to the new command, updated the changelog and the PR description and title.

cli/src/lib.rs Outdated Show resolved Hide resolved
cli/src/lib.rs Outdated Show resolved Hide resolved
cli/src/lib.rs Outdated Show resolved Hide resolved
@acheroncrypto
Copy link
Collaborator

Almost ready. Fixed the CI errors(rustfmt, and clippy) and did a bit of refactoring. The only remaining question is #2698 (comment), it shouldn't matter functionally but let me know what you think of removing the force checks for subfolders.

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you for addressing the feedback quickly and including a PR explanation.

@acheroncrypto acheroncrypto merged commit 870ee9a into coral-xyz:master Nov 11, 2023
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a new force flag to anchor init and anchor new
2 participants