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: Convert package managers to lowercase during serialization #3531

Conversation

acheroncrypto
Copy link
Collaborator

Problem

[toolchain.package_manager] field (added in #3328) is serialized using the enum defaults, meaning it will be in PascalCase format due to Rust's enum variants being PascalCase by convention.

For example, using anchor init program results in the following toolchain section:

[toolchain]
package_manager = "Yarn"

Using package_manager = "yarn" doesn't work:

Error: Unable to deserialize config: TOML parse error at line 2, column 19
  |
2 | package_manager = "yarn"

This is unintuitive, especially considering it's a lot more common to use lowercase when referring to package managers (and their commands) e.g. yarn or npm.

Summary of changes

Convert package manager names to lowercase during serialization.

Copy link

vercel bot commented Feb 3, 2025

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

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto added cli fix Bug fix PR labels Feb 3, 2025
@acheroncrypto acheroncrypto merged commit 96ed3b7 into coral-xyz:master Feb 4, 2025
52 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli fix Bug fix PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant