{"action":"closed","issue":{"url":"https://api.github.com/repos/oilshell/oil/issues/395","repository_url":"https://api.github.com/repos/oilshell/oil","labels_url":"https://api.github.com/repos/oilshell/oil/issues/395/labels{/name}","comments_url":"https://api.github.com/repos/oilshell/oil/issues/395/comments","events_url":"https://api.github.com/repos/oilshell/oil/issues/395/events","html_url":"https://github.com/oilshell/oil/issues/395","id":464075493,"node_id":"MDU6SXNzdWU0NjQwNzU0OTM=","number":395,"title":"exit from sourced file does not exit caller","user":{"login":"lhoursquentin","id":2931046,"node_id":"MDQ6VXNlcjI5MzEwNDY=","avatar_url":"https://avatars1.githubusercontent.com/u/2931046?v=4","gravatar_id":"","url":"https://api.github.com/users/lhoursquentin","html_url":"https://github.com/lhoursquentin","followers_url":"https://api.github.com/users/lhoursquentin/followers","following_url":"https://api.github.com/users/lhoursquentin/following{/other_user}","gists_url":"https://api.github.com/users/lhoursquentin/gists{/gist_id}","starred_url":"https://api.github.com/users/lhoursquentin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhoursquentin/subscriptions","organizations_url":"https://api.github.com/users/lhoursquentin/orgs","repos_url":"https://api.github.com/users/lhoursquentin/repos","events_url":"https://api.github.com/users/lhoursquentin/events{/privacy}","received_events_url":"https://api.github.com/users/lhoursquentin/received_events","type":"User","site_admin":false},"labels":[{"id":954430782,"node_id":"MDU6TGFiZWw5NTQ0MzA3ODI=","url":"https://api.github.com/repos/oilshell/oil/labels/high-priority","name":"high-priority","color":"6b43c1","default":false},{"id":1226364227,"node_id":"MDU6TGFiZWwxMjI2MzY0MjI3","url":"https://api.github.com/repos/oilshell/oil/labels/pending-release","name":"pending-release","color":"f2a7d2","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-07-04T05:54:16Z","updated_at":"2019-07-17T19:20:30Z","closed_at":"2019-07-17T19:20:30Z","author_association":"NONE","body":"An `exit` call in a sourced file only exits from the sourced file, not from the script that sourced it.\r\n\r\n```bash\r\n$ cat /tmp/foo\r\necho sourced pre-exit\r\nexit\r\necho sourced post-exit\r\n```\r\n```bash\r\n$ osh -c '. /tmp/foo; echo main'\r\nsourced pre-exit\r\nmain\r\n```\r\nThis `exit` should also exit the main process immediately:\r\n```bash\r\n$ bash -c '. /tmp/foo; echo main'\r\nsourced pre-exit\r\n```"}}
{"actor":{"display_login":"andychu"}}