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

Bad advice if curvenote finds multiple config files #535

Open
fwkoch opened this issue Apr 11, 2024 · 3 comments
Open

Bad advice if curvenote finds multiple config files #535

fwkoch opened this issue Apr 11, 2024 · 3 comments
Assignees

Comments

@fwkoch
Copy link
Contributor

fwkoch commented Apr 11, 2024

If you have both curvenote.yml and myst.yml in a directory, curvenote will not know which to use. However, it gives very bad advice... removing your token won't fix things, it will only give you another problem to resolve.

image

@stevejpurves
Copy link
Member

ouch, overall should we just prefer curvenote.yml over myst.yml and warn on that?
i'm not sure if that's easy to do

@fwkoch
Copy link
Contributor Author

fwkoch commented Apr 23, 2024

Defaulting to one rather than erroring would be easy to do over in myst: Just return configs[0] here, even when multiple are present - https://github.com/executablebooks/mystmd/blob/main/packages/myst-cli/src/config.ts#L38

However, the bigger thing to address for this specific issue is the logging here when there's an error initializing the session: https://github.com/curvenote/curvenote/blob/main/packages/curvenote-cli/src/session/utils.ts#L36 - I think for that, we just remove the catchall log message, and make sure we log useful messages in the right place.

@fwkoch
Copy link
Contributor Author

fwkoch commented Apr 25, 2024

#570 removes the bad advice in this case. My opinion is we just leave the error on multiple config files - I think this is a super unlikely thing for a user to hit, and if they do, relatively easy to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants