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

--extra-settings option in CLI conflict with site source path parameter #3366

Open
2 tasks done
kdeldycke opened this issue Jul 14, 2024 · 0 comments
Open
2 tasks done
Labels

Comments

@kdeldycke
Copy link
Contributor

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
@kdeldycke kdeldycke added the bug label Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant