{"action":"created","comment":{"url":"https://api.github.com/repos/tessel/t2-cli/pulls/comments/38134929","id":38134929,"diff_hunk":"@@ -54,6 +54,26 @@ Tessel.prototype.deployScript = function(opts) {\n   });\n };\n \n+Tessel.prototype.restartScript = function(opts) {\n+  var self = this;\n+  var isPush = opts.type === 'flash';\n+  var filepath = isPush ? PUSH_PATH : RUN_PATH;\n+\n+  return new Promise(function(resolve, reject) {\n+    actions.findProject(opts.entryPoint).then(function(project) {","path":"lib/tessel/deploy.js","position":10,"original_position":10,"commit_id":"f67231a0db9f4714bbdb5f2931b63cbb65cbf664","original_commit_id":"853d7bbb5db74890b1f065cbd92bb4b3c9423c3e","user":{"login":"rwaldron","id":27985,"avatar_url":"https://avatars.githubusercontent.com/u/27985?v=3","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false},"body":"That's not what I'm seeing. I get the \"module doesn't exist\" failure. \r\n\r\n> I think we should explicitly check that code exists in that remote directory prior to deployment and throw an error if it doesn't.\r\n\r\nWe can get this _for free_ already, we just need to catch the error and reject with the message accordingly. ","created_at":"2015-08-27T19:14:36Z","updated_at":"2015-08-27T19:14:36Z","html_url":"https://github.com/tessel/t2-cli/pull/265#discussion_r38134929","pull_request_url":"https://api.github.com/repos/tessel/t2-cli/pulls/265","_links":{"self":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/comments/38134929"},"html":{"href":"https://github.com/tessel/t2-cli/pull/265#discussion_r38134929"},"pull_request":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/265"}}},"pull_request":{"url":"https://api.github.com/repos/tessel/t2-cli/pulls/265","id":43435109,"html_url":"https://github.com/tessel/t2-cli/pull/265","diff_url":"https://github.com/tessel/t2-cli/pull/265.diff","patch_url":"https://github.com/tessel/t2-cli/pull/265.patch","issue_url":"https://api.github.com/repos/tessel/t2-cli/issues/265","number":265,"state":"open","locked":false,"title":"t2 restart <file> --type=flash|ram, defaults to \"ram\". Fixes gh-264","user":{"login":"rwaldron","id":27985,"avatar_url":"https://avatars.githubusercontent.com/u/27985?v=3","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-26T18:27:12Z","updated_at":"2015-08-27T19:14:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed7d3f12fb60d7f68ed20cf13f2a574a94655070","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tessel/t2-cli/pulls/265/commits","review_comments_url":"https://api.github.com/repos/tessel/t2-cli/pulls/265/comments","review_comment_url":"https://api.github.com/repos/tessel/t2-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tessel/t2-cli/issues/265/comments","statuses_url":"https://api.github.com/repos/tessel/t2-cli/statuses/f67231a0db9f4714bbdb5f2931b63cbb65cbf664","head":{"label":"rwaldron:264","ref":"264","sha":"f67231a0db9f4714bbdb5f2931b63cbb65cbf664","user":{"login":"rwaldron","id":27985,"avatar_url":"https://avatars.githubusercontent.com/u/27985?v=3","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false},"repo":{"id":34642706,"name":"t2-cli","full_name":"rwaldron/t2-cli","owner":{"login":"rwaldron","id":27985,"avatar_url":"https://avatars.githubusercontent.com/u/27985?v=3","gravatar_id":"","url":"https://api.github.com/users/rwaldron","html_url":"https://github.com/rwaldron","followers_url":"https://api.github.com/users/rwaldron/followers","following_url":"https://api.github.com/users/rwaldron/following{/other_user}","gists_url":"https://api.github.com/users/rwaldron/gists{/gist_id}","starred_url":"https://api.github.com/users/rwaldron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwaldron/subscriptions","organizations_url":"https://api.github.com/users/rwaldron/orgs","repos_url":"https://api.github.com/users/rwaldron/repos","events_url":"https://api.github.com/users/rwaldron/events{/privacy}","received_events_url":"https://api.github.com/users/rwaldron/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rwaldron/t2-cli","description":"Command line interface to Tessel 2.","fork":true,"url":"https://api.github.com/repos/rwaldron/t2-cli","forks_url":"https://api.github.com/repos/rwaldron/t2-cli/forks","keys_url":"https://api.github.com/repos/rwaldron/t2-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rwaldron/t2-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rwaldron/t2-cli/teams","hooks_url":"https://api.github.com/repos/rwaldron/t2-cli/hooks","issue_events_url":"https://api.github.com/repos/rwaldron/t2-cli/issues/events{/number}","events_url":"https://api.github.com/repos/rwaldron/t2-cli/events","assignees_url":"https://api.github.com/repos/rwaldron/t2-cli/assignees{/user}","branches_url":"https://api.github.com/repos/rwaldron/t2-cli/branches{/branch}","tags_url":"https://api.github.com/repos/rwaldron/t2-cli/tags","blobs_url":"https://api.github.com/repos/rwaldron/t2-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rwaldron/t2-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rwaldron/t2-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/rwaldron/t2-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rwaldron/t2-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/rwaldron/t2-cli/languages","stargazers_url":"https://api.github.com/repos/rwaldron/t2-cli/stargazers","contributors_url":"https://api.github.com/repos/rwaldron/t2-cli/contributors","subscribers_url":"https://api.github.com/repos/rwaldron/t2-cli/subscribers","subscription_url":"https://api.github.com/repos/rwaldron/t2-cli/subscription","commits_url":"https://api.github.com/repos/rwaldron/t2-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/rwaldron/t2-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/rwaldron/t2-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/rwaldron/t2-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/rwaldron/t2-cli/contents/{+path}","compare_url":"https://api.github.com/repos/rwaldron/t2-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rwaldron/t2-cli/merges","archive_url":"https://api.github.com/repos/rwaldron/t2-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rwaldron/t2-cli/downloads","issues_url":"https://api.github.com/repos/rwaldron/t2-cli/issues{/number}","pulls_url":"https://api.github.com/repos/rwaldron/t2-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/rwaldron/t2-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/rwaldron/t2-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rwaldron/t2-cli/labels{/name}","releases_url":"https://api.github.com/repos/rwaldron/t2-cli/releases{/id}","created_at":"2015-04-27T02:53:48Z","updated_at":"2015-06-24T22:11:15Z","pushed_at":"2015-08-26T21:14:35Z","git_url":"git://github.com/rwaldron/t2-cli.git","ssh_url":"git@github.com:rwaldron/t2-cli.git","clone_url":"https://github.com/rwaldron/t2-cli.git","svn_url":"https://github.com/rwaldron/t2-cli","homepage":"","size":671,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"tessel:master","ref":"master","sha":"3a5649fe79240366c2f4a4884764161873874fd0","user":{"login":"tessel","id":5573563,"avatar_url":"https://avatars.githubusercontent.com/u/5573563?v=3","gravatar_id":"","url":"https://api.github.com/users/tessel","html_url":"https://github.com/tessel","followers_url":"https://api.github.com/users/tessel/followers","following_url":"https://api.github.com/users/tessel/following{/other_user}","gists_url":"https://api.github.com/users/tessel/gists{/gist_id}","starred_url":"https://api.github.com/users/tessel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tessel/subscriptions","organizations_url":"https://api.github.com/users/tessel/orgs","repos_url":"https://api.github.com/users/tessel/repos","events_url":"https://api.github.com/users/tessel/events{/privacy}","received_events_url":"https://api.github.com/users/tessel/received_events","type":"Organization","site_admin":false},"repo":{"id":30388450,"name":"t2-cli","full_name":"tessel/t2-cli","owner":{"login":"tessel","id":5573563,"avatar_url":"https://avatars.githubusercontent.com/u/5573563?v=3","gravatar_id":"","url":"https://api.github.com/users/tessel","html_url":"https://github.com/tessel","followers_url":"https://api.github.com/users/tessel/followers","following_url":"https://api.github.com/users/tessel/following{/other_user}","gists_url":"https://api.github.com/users/tessel/gists{/gist_id}","starred_url":"https://api.github.com/users/tessel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tessel/subscriptions","organizations_url":"https://api.github.com/users/tessel/orgs","repos_url":"https://api.github.com/users/tessel/repos","events_url":"https://api.github.com/users/tessel/events{/privacy}","received_events_url":"https://api.github.com/users/tessel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tessel/t2-cli","description":"Command line interface to Tessel 2.","fork":false,"url":"https://api.github.com/repos/tessel/t2-cli","forks_url":"https://api.github.com/repos/tessel/t2-cli/forks","keys_url":"https://api.github.com/repos/tessel/t2-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tessel/t2-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tessel/t2-cli/teams","hooks_url":"https://api.github.com/repos/tessel/t2-cli/hooks","issue_events_url":"https://api.github.com/repos/tessel/t2-cli/issues/events{/number}","events_url":"https://api.github.com/repos/tessel/t2-cli/events","assignees_url":"https://api.github.com/repos/tessel/t2-cli/assignees{/user}","branches_url":"https://api.github.com/repos/tessel/t2-cli/branches{/branch}","tags_url":"https://api.github.com/repos/tessel/t2-cli/tags","blobs_url":"https://api.github.com/repos/tessel/t2-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tessel/t2-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tessel/t2-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/tessel/t2-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tessel/t2-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/tessel/t2-cli/languages","stargazers_url":"https://api.github.com/repos/tessel/t2-cli/stargazers","contributors_url":"https://api.github.com/repos/tessel/t2-cli/contributors","subscribers_url":"https://api.github.com/repos/tessel/t2-cli/subscribers","subscription_url":"https://api.github.com/repos/tessel/t2-cli/subscription","commits_url":"https://api.github.com/repos/tessel/t2-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/tessel/t2-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/tessel/t2-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/tessel/t2-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/tessel/t2-cli/contents/{+path}","compare_url":"https://api.github.com/repos/tessel/t2-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tessel/t2-cli/merges","archive_url":"https://api.github.com/repos/tessel/t2-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tessel/t2-cli/downloads","issues_url":"https://api.github.com/repos/tessel/t2-cli/issues{/number}","pulls_url":"https://api.github.com/repos/tessel/t2-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/tessel/t2-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/tessel/t2-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tessel/t2-cli/labels{/name}","releases_url":"https://api.github.com/repos/tessel/t2-cli/releases{/id}","created_at":"2015-02-06T01:27:53Z","updated_at":"2015-08-26T03:22:51Z","pushed_at":"2015-08-26T21:14:35Z","git_url":"git://github.com/tessel/t2-cli.git","ssh_url":"git@github.com:tessel/t2-cli.git","clone_url":"https://github.com/tessel/t2-cli.git","svn_url":"https://github.com/tessel/t2-cli","homepage":"","size":2187,"stargazers_count":25,"watchers_count":25,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":47,"forks":6,"open_issues":47,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/265"},"html":{"href":"https://github.com/tessel/t2-cli/pull/265"},"issue":{"href":"https://api.github.com/repos/tessel/t2-cli/issues/265"},"comments":{"href":"https://api.github.com/repos/tessel/t2-cli/issues/265/comments"},"review_comments":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/265/comments"},"review_comment":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tessel/t2-cli/pulls/265/commits"},"statuses":{"href":"https://api.github.com/repos/tessel/t2-cli/statuses/f67231a0db9f4714bbdb5f2931b63cbb65cbf664"}}}}