get-binary exits with 0 when the existing binary is kept
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start in GetBinaryCommand::execute() and installBinary(), which the issue names: execute() only returns 1 when installBinary() returns null, but the skipped file is returned too. Check the ExistingBinaryTest::failsWhenBinaryIsKept acceptance test referenced from #66 if it is present. Done when keeping an existing binary exits with 1 and prints the RoadRunner has not been installed warning.
Written by the indexing model from the issue text.
Description
Description
When the binary already exists and is not overwritten — the overwrite question is answered "no", or the command runs with --no-interaction — rr get keeps the old file (correct) but exits with 0 and prints [OK] Your project is now ready. Scripts cannot tell that nothing was installed.
GetBinaryCommand::execute() returns 1 with RoadRunner has not been installed only when installBinary() returns null, but installBinary() returns the skipped file as well.
Expected: exit code 1 and the RoadRunner has not been installed warning when the existing binary is kept.
Steps to reproduce
- Put any file named
rrinto an empty directory. - Run
rr get --no-config -nthere. - The file is unchanged, the exit code is 0.
Additional context
Found by the acceptance tests in #66 (ExistingBinaryTest::failsWhenBinaryIsKept). The DLoad-based implementation in #49 already returns 1 in this case.
- Dominant language
- PHP
- Stars
- 30
- Forks
- 15
- Avg merge
- 9h 37m
- Merged PRs (30d)
- 16
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from roadrunner-php/cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
roadrunner-php/cli#67 ·
Maintainers usually reply within 1 day
All issues in roadrunner-php/cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
matomo-org/device-detector#8405 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 4 days