You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently stumbled across the same issue with the poetry --project option. @abn kindly tried to fix this in the Poetry code that pre-processes arguments before passing them to Poetry, but that arguably just makes the problem worse. I'm not sure it can be fixed without explicit support by Cleo for this pattern?
In this context, I'd like to highlight that Poetry/Cleo handling of short and long options with values seems to be fairly unpredictable, e.g. I'd expect poetry -C path, poetry -Cpath, poetry --directory path, and poetry --directory=path to all be fully equivalent (and similarly for -P/--project). These equivalences are a common Linux command line convention (aka "whatever GNU getopt_long does", also well-supported by Python's argparse module). Yet we can observe a diverse range of errors with the poetry [OPTIONS] run [OPTIONS] COMMAND... syntax.
Activity
latk commentedon Jan 18, 2025
I recently stumbled across the same issue with the
poetry --projectoption. @abn kindly tried to fix this in the Poetry code that pre-processes arguments before passing them to Poetry, but that arguably just makes the problem worse. I'm not sure it can be fixed without explicit support by Cleo for this pattern?In this context, I'd like to highlight that Poetry/Cleo handling of short and long options with values seems to be fairly unpredictable, e.g. I'd expect
poetry -C path,poetry -Cpath,poetry --directory path, andpoetry --directory=pathto all be fully equivalent (and similarly for-P/--project). These equivalences are a common Linux command line convention (aka "whatever GNU getopt_long does", also well-supported by Python'sargparsemodule). Yet we can observe a diverse range of errors with thepoetry [OPTIONS] run [OPTIONS] COMMAND...syntax.References: