luckyframework / luckyframework/lucky_task

"to_end" positional_arg's shouldn't include other types of arguments (switch, arg, etc.)

Open
#9 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Crystal
Stars
8
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Getting this weird behavior where positional_arg with to_end: true will include all arguments before or after the positional argument.

Ex (other args before positional):

$ lucky importmap.pin --download -e production -f jspm react react-dom
download? # => true
env # => "production"
from # => "jspm"
packages # => ["--download", "-e", "production", "-f", "jspm", "react", "react-dom"]

Ex (other args after postional):

$ lucky importmap.pin react react-dom --download -e production -f jspm
download? # => true
env # => "production"
from # => "jspm"
packages # => ["react", "react-dom", "--download", "-e", "production", "-f", "jspm"]

If both aren't allowed, then at least the one before the positional_arg should work.
Expected:

$ lucky importmap.pin --download -e production -f jspm react react-dom
download? # => true
env # => "production"
from # => "jspm"
packages # => ["react", "react-dom"]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the two lucky importmap.pin command examples and trace the positional_arg handling when to_end: true is used. The fix is done when packages contains only react and react-dom while the switch and other named arguments retain their shown values.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.