Skip to content

travis-build: preserving the status in $? #3771

@grooverdan

Description

@grooverdan

Whether make succeeds or fails $? is always 1.

script:
  - make -j 4
  - COMPILE_RESULT=$?
  - echo COMPILE_RESULT=${COMPILE_RESULT}

output:

..
The command "make -j 4" exited with 0.

$ COMPILE_RESULT=$?
The command "COMPILE_RESULT=$?" exited with 0.

$ echo COMPILE_RESULT=${COMPILE_RESULT}
COMPILE_RESULT=1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions