Added switch to disable verbose exit codes.
In the near future, the default exit code behavior should be made obsolete anyway, as the exit codes are not a nice way to report status. It used to be convenient for shell scripting in early times, when the parallel tests were run using the forward model checker, but no modern script should be relying on it.
This commit is contained in:
parent
c729d13a00
commit
a0a377a84f
@ -234,8 +234,15 @@ main (int argc, char **argv)
|
||||
/* memory clean up? */
|
||||
strings_cleanup ();
|
||||
|
||||
if (switches.exitCodes)
|
||||
{
|
||||
return exitcode;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//! Analyse the model
|
||||
/**
|
||||
|
@ -108,6 +108,7 @@ switchesInit (int argc, char **argv)
|
||||
switches.monochrome = false; // default colors for dot
|
||||
switches.lightness = 0; // lightness correction
|
||||
switches.clusters = false; // default is no clusters for now
|
||||
switches.exitCodes = true; // default is to flag exit codes
|
||||
|
||||
// Process the environment variable SCYTHERFLAGS
|
||||
process_environment ();
|
||||
@ -900,6 +901,22 @@ switcher (const int process, int index, int commandline)
|
||||
}
|
||||
}
|
||||
|
||||
if (detect (' ', "no-exitcodes", 0))
|
||||
{
|
||||
if (!process)
|
||||
{
|
||||
if (switches.expert)
|
||||
{
|
||||
helptext (" --no-exitcodes", "Disable verbose exitcodes.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switches.exitCodes = false;
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ==================
|
||||
* Modelchecker only
|
||||
|
@ -83,7 +83,8 @@ struct switchdata
|
||||
int plain; //!< Disable color output on terminal
|
||||
int monochrome; //!< Disable colors in dot output
|
||||
int lightness; //!< Lightness increment 0-100
|
||||
int clusters; //!> Enable clusters in output
|
||||
int clusters; //!< Enable clusters in output
|
||||
int exitCodes; //!< Enable verbose exit codes
|
||||
};
|
||||
|
||||
extern struct switchdata switches; //!< pointer to switchdata structure
|
||||
|
Loading…
Reference in New Issue
Block a user