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

Tilde won't expand in the config file path (specific to the vscode extension) #422

Closed
MatrixRanger98 opened this issue Mar 6, 2024 · 3 comments

Comments

@MatrixRanger98
Copy link

I have a config file named ruff.toml in my directory. If I run ruff format . --config ~/ruff.toml, everything is fine. However, if I put the following settings in vscode

{
"ruff.format.args": ["--config","~/ruff.toml"]
}

then I got the error:

Ruff: Format failed (error: invalid value '~/ruff.toml' for '--config <CONFIG_OPTION>' tip: A --config flag must either be a path to a .toml configuration file or a TOML <KEY> = <VALUE> pair overriding a specific configuration option It looks like you were trying to pass a path to a configuration file. The path ~/ruff.toml does not exist For more information, try '--help'.

@charliermarsh
Copy link
Member

I believe this is fixed on main but not yet released!

@charliermarsh
Copy link
Member

See: astral-sh/ruff#10219. Will be fixed in the next release.

@MatrixRanger98
Copy link
Author

Thanks! And just confirmed that the current main works well.

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