Skip to content

get-binary exits with 0 when the existing binary is kept #69

Description

@roxblnfk

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

  1. Put any file named rr into an empty directory.
  2. Run rr get --no-config -n there.
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions