Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs about the exit code #262

Merged
merged 3 commits into from
Nov 7, 2024
Merged

Fix bugs about the exit code #262

merged 3 commits into from
Nov 7, 2024

Commits on Nov 5, 2024

  1. fix: Make fail: false effective even when failIfEmpty: true

    This commit also makes sure `outputs.exit_code` is “The exit code returned from Lychee”. `failIfEmpty` no longer changes it to `1`.
    
    Relevant docs:
    - [Setting exit codes for actions - GitHub Docs](https://docs.github.com/en/actions/sharing-automations/creating-actions/setting-exit-codes-for-actions)
    - [exit - POSIX Programmer's Manual](https://manned.org/exit.1posix)
    
    Relates to lycheeverse#86, lycheeverse#128, lycheeverse#145, lycheeverse#245, and lycheeverse#251.
    YDX-2147483647 committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    fabf016 View commit details
    Browse the repository at this point in the history
  2. fix: Update env.exit_code to outputs.exit_code

    The previous expression always gives `false`.
    Both `env.exit_code` and `env.lychee_exit_code` are `null`, probably since the docker→composite refactor lycheeverse#128. When GitHub evaluates the expression, it finds the types do not match, and coerces them to number, namely, `null` → `0`.
    
    See [Evaluate expressions in workflows and actions - GitHub Docs](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#operators).
    
    Relates to lycheeverse#253.
    YDX-2147483647 committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    f484cb5 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2024

  1. test: fail: false should fail on error

    Edited from lycheeverse#251.
    
    Co-Authored-By: Sebastiaan Speck <[email protected]>
    sebastiaanspeck authored and YDX-2147483647 committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    807e86a View commit details
    Browse the repository at this point in the history