actions / actions/runner

`run.sh` and `run-helper.sh` don't return the exit codes from `Runner.Listener`

Open
#4,164 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug
run.sh does not return the exit code from run-helper.sh. It addresses a return code of 2 and otherwise always returns 0. run-helper.sh does something similar. This makes the return code largely useless as you must always check stdout/err to see what happened.

Expected behavior
this line should be exit $returnCode. Similarly, several conditionals here return code 0 when they really shouldn't - at the very least, maybe this line should change?

That way, if I'm launching this from something expecting to report an error if execution did not succeed, it will actually know.

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

Read src/Misc/layoutroot/run.sh at line 24 and run-helper.sh.template around line 78, then trace the existing return-code conditionals. Done means both scripts preserve the relevant Runner.Listener failure exit codes, including cases currently converted to zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
ci-cd
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.