Tilde won't expand in the config file path (specific to the vscode extension)
MatrixRanger98 opened this issue · comments
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'.
I believe this is fixed on main
but not yet released!
See: astral-sh/ruff#10219. Will be fixed in the next release.
Thanks! And just confirmed that the current main
works well.