Skip to content

Commit

Permalink
remove exitWithoutError option
Browse files Browse the repository at this point in the history
  • Loading branch information
metelkin committed May 29, 2024
1 parent f679201 commit bb542ff
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
8 changes: 3 additions & 5 deletions bin/heta-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,16 @@ program
} catch(error) {
if (error.name === 'HetaLevelError') {
process.stdout.write(error.message + '\nSTOP!\n');
process.exit(3);
} else {
process.stdout.write(contactMessage + '\n');
process.stdout.write(error.stack);
process.exit(1); // unexpected error
}
process.exit(1);
}
if (builder.container.hetaErrors().length > 0) {
process.stdout.write('Compilation ERROR! See logs.\n');
if (declaration.options.exitWithoutError)
process.exit(0);
else
process.exit(1);
process.exit(2);
} else {
process.stdout.write('Compilation OK!\n');
process.exit(0);
Expand Down
4 changes: 1 addition & 3 deletions cli-references.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ There are properties in declaration file which do not change compilation process
| options.distDir | string | --dist-dir | dist | At default all export files are created inside **dist** directory. The option can set the another target for storing outputs. |
| options.debug | boolean | --debug | false | Working in debugging mode. All parsed modules will be saved in JSON files in meta directory. |
| options.metaDir | string | --meta-dir | meta | If `options.debug` is set as `true` this option changes the target directory for meta files. |
| options.exitWithoutError | boolean | | false | If there are errors in compilation the `heta build` command return status 1 to console (which means error). If you set true this will return 0. This can be helpful for using autotesting and CI/CD automatization. |

Using neither declaration file nor CLI options is equivalent to the following declaration:
```json
Expand All @@ -234,8 +233,7 @@ Using neither declaration file nor CLI options is equivalent to the following de
"debug": false,
"unitsCheck": false,
"skipExport": false,
"juliaOnly": false,
"exitWithoutError": false
"juliaOnly": false
},
"importModule": {
"source": "index.heta",
Expand Down
4 changes: 2 additions & 2 deletions export-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The general format for all export actions is the following:
};
```

See also [Regular expressions syntax](https://en.wikipedia.org/wiki/Regular_expression).
See also [Regular expressions' syntax](https://en.wikipedia.org/wiki/Regular_expression).

## JSON

Expand Down Expand Up @@ -461,7 +461,7 @@ _Skipped cell means no conversion_
|`a xor b`| |`xor(a, b)`| |`xor(a, b)`|
|`not a`| |`!a`| |`~a`|
|`b1 < b2 ? x : y`| `ifgt(b1, b2, x, y)`| | |`tern__(b1 < b2, x, y)`|
|`piecewise(value1, cond1, value2, cond2, ..., otherwise)`|not supported| |not supported| |
|`piecewise(value1, cond1, value2, cond2, ..., otherwise)`|not supported| + |not supported| |
|`acos(x)`, `acot(x)`, `acsc(x)`,`asec(x)`, `asin(x)`, `atan(x)`, `cos(x)`, `cot(x)`, `csc(x)`, `sec(x)`, `sin(x)`, `tan(x)`| | | | |

_Conversion to SBML's MathML_
Expand Down
3 changes: 1 addition & 2 deletions src/builder/declaration-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"juliaOnly": {"type": "boolean", "default": false},
"distDir": {"type": "string", "default": "dist" },
"debug": {"type": "boolean", "default": false, "description": "Should we put parsed modules to meta?"},
"metaDir": {"type": "string", "default": "meta" },
"exitWithoutError": {"type": "boolean", "default": false}
"metaDir": {"type": "string", "default": "meta" }
},
"default": {"debug": false, "logLevel": "info"}
},
Expand Down

0 comments on commit bb542ff

Please sign in to comment.