`--assume_extension` unexpected behaviour
bmaupin opened this issue · comments
Hi,
I'm using the latest version of htmlproofer:
$ htmlproofer --version
htmlproofer 4.3.2
According to the help text (and the readme of this repo), --assume_extension
has a default value of .html
. This seems to me that I should be able to use it without a parameter (since it has a default), but that doesn't seem to work.
As an example, using --assume_extension
without a parameter seems to break the next option (--disable-external
):
$ timeout 1 htmlproofer _site --assume_extension --disable-external true
Running 3 checks (Images, Scripts, Links) in ["_site"] on *.html files...
Checking 1270 external links
If I provide a parameter to --assume_extension
, it seems to work as expected:
$ timeout 1 htmlproofer _site --assume_extension ".html" --disable-external true
Running 3 checks (Images, Scripts, Links) in ["_site"] on *.html files...
Checking 898 internal links
Thanks!
@bmaupin, the way the CLI argument works is that the default value is the one used if you do not specify the argument at all.
The argument, if specified, must be followed by a value, otherwise the next option is interpreted as the value.
See also e.g. #743 (and other recent issues) for similar problem with command-line arguments
@riccardoporreca So if I understand correctly, I should remove --assume-extension
altogether if I want the default behaviour? e.g.
htmlproofer _site --disable-external true
I should remove --assume-extension altogether if I want the default behaviour?
Indeed, as far as my understanding of such command-line arguments goes