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

fatal error conditions should return a non-zero status code (Linux, maybe MacOS) #84

Open
bxparks opened this issue Jun 22, 2024 · 0 comments

Comments

@bxparks
Copy link

bxparks commented Jun 22, 2024

Problem

When spasm-ng detects a fatal error condition, which almost always generates incorrect machine code, the spasm executable seems to always return a 0 "success" status code (at least on Linux).

It is very easy to miss the fatal error message. A non-zero status code would make it far easier for the user to detect the fatal error:

  1. The shell can be configured to indicate a failed command loudly to the user (using a custom prompt for example),
  2. If the spasm is executed through a Makefile, the make command will terminate the workflow, perform any necessary clean up of intermediary files, and print a fatal error message to the user.

This problem also prevents the creation of a Continuous Integration (CI) pipeline for assembly programs, using GitHub Actions for example. Because the automation tool cannot detect a fatal error condition.

Expectation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant