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

Scripts try to execute help as a command argument #272

Closed
1 task done
yajo opened this issue Feb 24, 2021 · 0 comments
Closed
1 task done

Scripts try to execute help as a command argument #272

yajo opened this issue Feb 24, 2021 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@yajo
Copy link

yajo commented Feb 24, 2021

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

  1. Clone copier-org/copier@fe23af4
  2. pdm install -s docs
  3. pdm run -v docs

Actual behavior

Running cmd script: ['mkdocs', 'serve']
Traceback (most recent call last):
  File "/var/home/yajo/.local/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 73, in __call__
    return self.main(*args, **kwargs)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 112, in main
    raise err.with_traceback(traceback)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/core.py", line 108, in main
    f(options.project, options)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/cli/commands/run.py", line 161, in handle
    self._run_script(project, options.command, options.args, global_env_options)
  File "/var/home/yajo/.local/pipx/venvs/pdm/lib64/python3.9/site-packages/pdm/cli/commands/run.py", line 142, in _run_script
    return self._run_command(project, args, **options)
TypeError: _run_command() got an unexpected keyword argument 'help'

Expected behavior

No error, it just runs mkdocs serve.

It seems it's taking script help as if it were meant to be executable code.

FTR:

➤ pdm run -vl
Name     Type Script                                             Description                                
-------- ---- -------------------------------------------------- -------------------------------------------
clean    call devtasks:clean                                     remove build/python artifacts              
coverage cmd  pytest --cov-report html --cov copier copier tests generate an HTML report of the coverage    
docs     cmd  mkdocs serve                                       start local docs server                    
lint     cmd  pre-commit run --all-files                         check (and auto-fix) style with pre-commit 
test     cmd  pytest --color=yes                                 run tests                                  
types    cmd  mypy --ignore-missing-imports .                    run the type (mypy) checker on the codebase

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:        1.3.1                        
Python Interpreter: /usr/bin/python (3.9.1)      
Project Root:       /var/home/yajo/mydevel/copier
{
  "implementation_name": "cpython",
  "implementation_version": "3.9.1",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.10.12-200.fc33.x86_64",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Mon Feb 1 02:40:52 UTC 2021",
  "python_full_version": "3.9.1",
  "platform_python_implementaiton": "CPython",
  "python_version": "3.9",
  "sys_platform": "linux"
}
@yajo yajo added the 🐛 bug Something isn't working label Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant