{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/botbuilder-tools/issues/599","repository_url":"https://api.github.com/repos/Microsoft/botbuilder-tools","labels_url":"https://api.github.com/repos/Microsoft/botbuilder-tools/issues/599/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/botbuilder-tools/issues/599/comments","events_url":"https://api.github.com/repos/Microsoft/botbuilder-tools/issues/599/events","html_url":"https://github.com/Microsoft/botbuilder-tools/issues/599","id":364471764,"node_id":"MDU6SXNzdWUzNjQ0NzE3NjQ=","number":599,"title":"Dispatch cli tool does not error correctly","user":{"login":"JeffCordes","id":33933531,"node_id":"MDQ6VXNlcjMzOTMzNTMx","avatar_url":"https://avatars0.githubusercontent.com/u/33933531?v=4","gravatar_id":"","url":"https://api.github.com/users/JeffCordes","html_url":"https://github.com/JeffCordes","followers_url":"https://api.github.com/users/JeffCordes/followers","following_url":"https://api.github.com/users/JeffCordes/following{/other_user}","gists_url":"https://api.github.com/users/JeffCordes/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffCordes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffCordes/subscriptions","organizations_url":"https://api.github.com/users/JeffCordes/orgs","repos_url":"https://api.github.com/users/JeffCordes/repos","events_url":"https://api.github.com/users/JeffCordes/events{/privacy}","received_events_url":"https://api.github.com/users/JeffCordes/received_events","type":"User","site_admin":false},"labels":[{"id":929089718,"node_id":"MDU6TGFiZWw5MjkwODk3MTg=","url":"https://api.github.com/repos/Microsoft/botbuilder-tools/labels/dispatch-cli","name":"dispatch-cli","color":"efd562","default":false}],"state":"closed","locked":false,"assignee":{"login":"tsuwandy","id":10739108,"node_id":"MDQ6VXNlcjEwNzM5MTA4","avatar_url":"https://avatars1.githubusercontent.com/u/10739108?v=4","gravatar_id":"","url":"https://api.github.com/users/tsuwandy","html_url":"https://github.com/tsuwandy","followers_url":"https://api.github.com/users/tsuwandy/followers","following_url":"https://api.github.com/users/tsuwandy/following{/other_user}","gists_url":"https://api.github.com/users/tsuwandy/gists{/gist_id}","starred_url":"https://api.github.com/users/tsuwandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsuwandy/subscriptions","organizations_url":"https://api.github.com/users/tsuwandy/orgs","repos_url":"https://api.github.com/users/tsuwandy/repos","events_url":"https://api.github.com/users/tsuwandy/events{/privacy}","received_events_url":"https://api.github.com/users/tsuwandy/received_events","type":"User","site_admin":false},"assignees":[{"login":"tsuwandy","id":10739108,"node_id":"MDQ6VXNlcjEwNzM5MTA4","avatar_url":"https://avatars1.githubusercontent.com/u/10739108?v=4","gravatar_id":"","url":"https://api.github.com/users/tsuwandy","html_url":"https://github.com/tsuwandy","followers_url":"https://api.github.com/users/tsuwandy/followers","following_url":"https://api.github.com/users/tsuwandy/following{/other_user}","gists_url":"https://api.github.com/users/tsuwandy/gists{/gist_id}","starred_url":"https://api.github.com/users/tsuwandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsuwandy/subscriptions","organizations_url":"https://api.github.com/users/tsuwandy/orgs","repos_url":"https://api.github.com/users/tsuwandy/repos","events_url":"https://api.github.com/users/tsuwandy/events{/privacy}","received_events_url":"https://api.github.com/users/tsuwandy/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-09-27T13:17:24Z","updated_at":"2018-10-01T18:13:51Z","closed_at":"2018-10-01T18:13:51Z","author_association":"NONE","body":"## Tool\r\nName: Dispatch\r\nVersion: 1.1.0\r\nOS: win 10 1803\r\n\r\n## Describe the bug\r\nRunning dispatch commands from powershell does not properly set the $? (if last call succeeded) variable or exit codes on errors.  \r\n\r\n## To Reproduce\r\nSteps to reproduce the behavior:\r\n1. in powershell Run a dispatch init command with a bad char in the -dataFolder \r\n2. example: dispatch init -name AdminDispatcher-n2a -luisAuthoringKey avalidkey -luisAutho\r\nringRegion westus -dataFolder AdminDispatcher.?*\r\n3. in powershell execute the command $?\r\n\r\n## Expected behavior\r\nFalse (actual behavior is True)\r\n\r\n## To Reproduce (scenario 2)\r\nSteps to reproduce the behavior:\r\n1. create a powershell .ps1 script with the following contents\r\n```\r\ntry\r\n{\r\n    dispatch init -name AdminDispatcher-n2a -luisAuthoringKey myauthoringkey -luisAuthoringRegion westus -dataFolder AdminDispatcher.?*\r\n}\r\ncatch\r\n{\r\n    Write-Error \"A Error has occured\"\r\n    exit 1\r\n}\r\n```\r\n2. Execute the script\r\n\r\n## Expected behavior (scenario 2)\r\nthe script outputs \"A Error has occured\" and returns exit code 1\r\n\r\nThe actual result is that it returns exit code 0\r\n\r\n[bug]\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/botbuilder-tools/issues/comments/426008323","html_url":"https://github.com/Microsoft/botbuilder-tools/issues/599#issuecomment-426008323","issue_url":"https://api.github.com/repos/Microsoft/botbuilder-tools/issues/599","id":426008323,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjAwODMyMw==","user":{"login":"tsuwandy","id":10739108,"node_id":"MDQ6VXNlcjEwNzM5MTA4","avatar_url":"https://avatars1.githubusercontent.com/u/10739108?v=4","gravatar_id":"","url":"https://api.github.com/users/tsuwandy","html_url":"https://github.com/tsuwandy","followers_url":"https://api.github.com/users/tsuwandy/followers","following_url":"https://api.github.com/users/tsuwandy/following{/other_user}","gists_url":"https://api.github.com/users/tsuwandy/gists{/gist_id}","starred_url":"https://api.github.com/users/tsuwandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsuwandy/subscriptions","organizations_url":"https://api.github.com/users/tsuwandy/orgs","repos_url":"https://api.github.com/users/tsuwandy/repos","events_url":"https://api.github.com/users/tsuwandy/events{/privacy}","received_events_url":"https://api.github.com/users/tsuwandy/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T18:13:51Z","updated_at":"2018-10-01T18:13:51Z","author_association":"COLLABORATOR","body":"Latest package published to npm with fix."}}
{"actor":{"display_login":"tsuwandy"}}