Closed sharadhr closed 1 year ago
--config-file
takes multiple arguments. My guess is you wrote something like:
cmake-format --config-file /tmp/cmake-format.py /tmp/bad.cmake
But you should use
cmake-format --config-file /tmp/cmake-format.py -- /tmp/bad.cmake
(note the --
to terminate --config-file
).
Yes, this is not ideal...
How to reproduce:
cmake-format --dump-config > some/random/path/cmake-format.py
cmake-format --config-file some/random/path/cmake-format.py
; the above CMakeLists.txt is not changed whatsoever.That said, leaving a cmake-format.json file in the same directory as the CMakeLists.txt and running cmake-format with no arguments works fine.
In my particular case, I was using/Desktop, which also doesn't work.
$XDG_CONFIG_HOME/cmake-format.json
which expands to/home/<my_username>/.config/cmake-format.json
. I thought the full stop in the path might be causing problems, so I also tried /home/