Skip to content

Commit 19f2e8f

Browse files
committed
[update] the executable component to use the runtimes program status for obtaining results.
1 parent 577152e commit 19f2e8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Lamscript/Main.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ int main(int argc, char** argv) {
99
std::cout << "Usage: lamscript [script]" << std::endl;
1010
exit(64);
1111
} else if (argc == 2) {
12-
lamscript::runtime::Lamscript::RunFile(argv[1]);
13-
exit(0);
12+
lamscript::runtime::ProgramResult result =
13+
lamscript::runtime::Lamscript::RunFile(argv[1]);
14+
exit(result.ReturnCode);
1415
} else {
1516
lamscript::runtime::Lamscript::RunPrompt();
1617
exit(0);

0 commit comments

Comments
 (0)