`--extra-settings` option in CLI conflict with site source path parameter
kdeldycke opened this issue · 0 comments
-
I have read the Filing Issues and subsequent “How to Get Help” sections of the documentation.
-
I have searched the issues (including closed ones) and believe that this is not a duplicate.
-
OS version and name: macOS Sonoma
14.5
-
Python version:
3.12.4
-
Pelican version:
4.9.1
-
Link to theme: https://github.com/kdeldycke/plumage
-
Links to plugins: https://github.com/kdeldycke/kevin-deldycke-blog/blob/7f5d4c961d802552f03840026bbc02dfe2bcd681/pyproject.toml#L28-L49
-
Link to your site: https://kevin.deldycke.com
-
Link to your source: https://github.com/kdeldycke/kevin-deldycke-blog
-
Link to a Gist with the contents of your settings file: https://github.com/kdeldycke/kevin-deldycke-blog/blob/7f5d4c961d802552f03840026bbc02dfe2bcd681/pelicanconf.py
Issue
The following CLI invokation works as expected:
$ pelican --extra-settings SITEURL='"https://kevin.deldycke.com"' --verbose ./content
(...)
But swapping the --extra-settings
and --verbose
option make the CLI fail:
$ pelican --verbose --extra-settings SITEURL='"https://kevin.deldycke.com"' ./content
Traceback (most recent call last):
File "/home/runner/work/kevin-deldycke-blog/kevin-deldycke-blog/.venv/lib/python3.12/site-packages/pelican/__init__.py", line 290, in __call__
k, v = item.split("=", 1)
^^^^
ValueError: not enough values to unpack (expected 2, got 1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/runner/work/kevin-deldycke-blog/kevin-deldycke-blog/.venv/bin/pelican", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/runner/work/kevin-deldycke-blog/kevin-deldycke-blog/.venv/lib/python3.12/site-packages/pelican/__init__.py", line 618, in main
args = parse_arguments(argv)
^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/kevin-deldycke-blog/kevin-deldycke-blog/.venv/lib/python3.12/site-packages/pelican/__init__.py", line 495, in parse_arguments
args = parser.parse_args(argv)
^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/argparse.py", line 1896, in parse_args
args, argv = self.parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/argparse.py", line 1929, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/argparse.py", line 2150, in _parse_known_args
start_index = consume_optional(start_index)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/argparse.py", line 2090, in consume_optional
take_action(action, args, option_string)
File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/argparse.py", line 2005, in take_action
action(self, namespace, argument_values, option_string)
File "/home/runner/work/kevin-deldycke-blog/kevin-deldycke-blog/.venv/lib/python3.12/site-packages/pelican/__init__.py", line 292, in __call__
raise ValueError(
ValueError: Extra settings must be specified as KEY=VALUE pairs but you specified ./content