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
rr into an empty directory.
- Run
rr get --no-config -n there.
- 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.
Description
When the binary already exists and is not overwritten — the overwrite question is answered "no", or the command runs with
--no-interaction—rr getkeeps 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 withRoadRunner has not been installedonly wheninstallBinary()returns null, butinstallBinary()returns the skipped file as well.Expected: exit code 1 and the
RoadRunner has not been installedwarning when the existing binary is kept.Steps to reproduce
rrinto an empty directory.rr get --no-config -nthere.Additional context
Found by the acceptance tests in #66 (
ExistingBinaryTest::failsWhenBinaryIsKept). The DLoad-based implementation in #49 already returns 1 in this case.