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

--config fantomas-config.json gives error #821

Closed
knocte opened this issue May 10, 2020 · 0 comments · Fixed by #829
Closed

--config fantomas-config.json gives error #821

knocte opened this issue May 10, 2020 · 0 comments · Fixed by #829

Comments

@knocte
Copy link
Contributor

knocte commented May 10, 2020

fantomas --config fantomas-config.json foo.fs throws the error:

Couldn't process one or more Fantomas configuration files, falling back to the default configuration
System.ArgumentException: Path cannot be the empty string or all whitespace. (Parameter 'path')
   at System.IO.Directory.GetParent(String path)
   at Fantomas.ConfigFile.findConfigurationFiles(String fileOrFolder) in /home/runner/work/fantomas/fantomas/src/Fantomas/ConfigFile.fs:line 29
   at Fantomas.CodeFormatterImpl.readConfiguration(String fileOrFolder) in /home/runner/work/fantomas/fantomas/src/Fantomas/CodeFormatterImpl.fs:line 678

Expected results: should act like if config file path supplied was ./fantomas-config.json, i.e. the ./ should be by default if not prepended.

nojaf added a commit that referenced this issue May 16, 2020
* Allow passing fantomas-config.json without any path prefix. Fixes #821.

* Updated casing after bad merge
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

Successfully merging a pull request may close this issue.

1 participant