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

`exit` doesn't end OSH session #87

Closed
timetoplatypus opened this Issue Mar 5, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@timetoplatypus
Contributor

timetoplatypus commented Mar 5, 2018

Just realized while tinkering with #86, running exit in OSH doesn't terminate the session.

$> osh --version
Oil version 0.4.0
Release Date: 2018-02-03 07:15:16+00:00
[...]
$> osh
$osh> exit
$osh>

Running exit doesn't throw an error or anything, it just doesn't do anything. Running with OVM_VERBOSE set to 1 doesn't print any other information either.

After doing to a clean build from git as well (the alpha 0.5 version), I get the same behavior.

@andychu

This comment has been minimized.

Show comment
Hide comment
@andychu

andychu Mar 5, 2018

Contributor

Oops, I think I broke that when I was changing exit to use exceptions rather than sys.exit(). Let me look into it! Thanks!

Contributor

andychu commented Mar 5, 2018

Oops, I think I broke that when I was changing exit to use exceptions rather than sys.exit(). Let me look into it! Thanks!

andychu pushed a commit that referenced this issue Mar 5, 2018

Andy Chu
Interactive loop respects the 'exit' builtin.
Fixes issue #87.

I had changed the exit builtin to control flow, and the interactive loop
just swallowed its status.  Now we have a new function that returns
(status, is_control_flow).
@andychu

This comment has been minimized.

Show comment
Hide comment
@andychu

andychu Mar 5, 2018

Contributor

OK thanks, I fixed it. (This problem was only in the interactive loop, not batch mode.)

Contributor

andychu commented Mar 5, 2018

OK thanks, I fixed it. (This problem was only in the interactive loop, not batch mode.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment