Skip to content
Snippets Groups Projects
Commit e96488f6 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

use correct exit code in RCommand.readEvalPrint upon call to "quit"

parent 59132924
Branches
No related tags found
No related merge requests found
...@@ -296,7 +296,8 @@ public class RCommand { ...@@ -296,7 +296,8 @@ public class RCommand {
context.eval(QUIT_EOF); context.eval(QUIT_EOF);
} catch (PolyglotException e2) { } catch (PolyglotException e2) {
if (e2.isExit()) { if (e2.isExit()) {
return e2.getExitStatus(); // don't use the exit code from the PolyglotException
return lastStatus;
} }
throw fatal(e, "error while calling quit"); throw fatal(e, "error while calling quit");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment