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

Invalid handling of multi-word script argument #95

Open
bergercookie opened this issue Sep 28, 2019 · 0 comments
Open

Invalid handling of multi-word script argument #95

bergercookie opened this issue Sep 28, 2019 · 0 comments
Labels

Comments

@bergercookie
Copy link

Description

I'm trying to run the vprof profiler on a script that accepts cmdline arguments.
I want to use it on the following command:

./tw_gcal_sync --gcal-calendar 'TW Reminders' --taskwarrior-tag 'remindme'

When I run that command on its own it works fine, but when I prepend vprof as in the following case my script complains about invalid extra arguments. Here's the complete output

~/taskw_gcal_sync$ vprof -c cmh  "./tw_gcal_sync --gcal-calendar 'TW Reminders' --taskwarrior-tag 'remindme'"
Running MemoryProfiler...
Usage: tw_gcal_sync [OPTIONS]
Try "tw_gcal_sync --help" for help.
Error: Got unexpected extra argument (Reminders')
Running FlameGraphProfiler...
Usage: tw_gcal_sync [OPTIONS]
Try "tw_gcal_sync --help" for help.
Error: Got unexpected extra argument (Reminders')
Running CodeHeatmapProfiler...
Usage: tw_gcal_sync [OPTIONS]
Try "tw_gcal_sync --help" for help.
Error: Got unexpected extra argument (Reminders')
How to reproduce

I think it's down to wrong management of multi-word arguments of the script under profiling.
If I run the same command and substitute TW Reminders with just TW it works fine.

Just run vprof with a script that accepts multi-word arguments. It will split them into separate arguments

Version and platform

Installed via pip - 0.37.6

@nvdv nvdv added the bug label Oct 12, 2019
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

2 participants