{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/comments/158152081","pull_request_review_id":84916472,"id":158152081,"diff_hunk":"@@ -291,6 +291,19 @@ export class Debuglet extends EventEmitter {\n     const that = this;\n     const stat = promisify(fs.stat);\n \n+    const workingDir = that.config.workingDirectory;\n+    // Don't continue if the working directory is a root directory\n+    if (path.join(workingDir, '..') === workingDir) {\n+      that.logger.error(\n+          `Refusing to start with \\`workingDirectory\\` set to a root directory:  '${","path":"src/agent/debuglet.ts","position":null,"original_position":8,"commit_id":"9bc9f8975ff7a40409dbc79f95c94a373c7ddf60","original_commit_id":"2cf48a90f68b54271fad1c76e9ca4ee0153071d2","user":{"login":"DominicKramer","id":14253877,"avatar_url":"https://avatars3.githubusercontent.com/u/14253877?v=4","gravatar_id":"","url":"https://api.github.com/users/DominicKramer","html_url":"https://github.com/DominicKramer","followers_url":"https://api.github.com/users/DominicKramer/followers","following_url":"https://api.github.com/users/DominicKramer/following{/other_user}","gists_url":"https://api.github.com/users/DominicKramer/gists{/gist_id}","starred_url":"https://api.github.com/users/DominicKramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DominicKramer/subscriptions","organizations_url":"https://api.github.com/users/DominicKramer/orgs","repos_url":"https://api.github.com/users/DominicKramer/repos","events_url":"https://api.github.com/users/DominicKramer/events{/privacy}","received_events_url":"https://api.github.com/users/DominicKramer/received_events","type":"User","site_admin":false},"body":"I've updated the error message and log message to be the same.","created_at":"2017-12-20T22:23:19Z","updated_at":"2017-12-20T22:23:19Z","html_url":"https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/pull/381#discussion_r158152081","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/381","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/comments/158152081"},"html":{"href":"https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/pull/381#discussion_r158152081"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/381"}},"in_reply_to_id":158141039},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/381","id":159506753,"html_url":"https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/pull/381","diff_url":"https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/pull/381.diff","patch_url":"https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/pull/381.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/issues/381","number":381,"state":"open","locked":false,"title":"fix: refuse to start if working dir is root dir","user":{"login":"DominicKramer","id":14253877,"avatar_url":"https://avatars3.githubusercontent.com/u/14253877?v=4","gravatar_id":"","url":"https://api.github.com/users/DominicKramer","html_url":"https://github.com/DominicKramer","followers_url":"https://api.github.com/users/DominicKramer/followers","following_url":"https://api.github.com/users/DominicKramer/following{/other_user}","gists_url":"https://api.github.com/users/DominicKramer/gists{/gist_id}","starred_url":"https://api.github.com/users/DominicKramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DominicKramer/subscriptions","organizations_url":"https://api.github.com/users/DominicKramer/orgs","repos_url":"https://api.github.com/users/DominicKramer/repos","events_url":"https://api.github.com/users/DominicKramer/events{/privacy}","received_events_url":"https://api.github.com/users/DominicKramer/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-20T20:06:57Z","updated_at":"2017-12-20T22:23:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e325e775c37996a41a6dd4dcd1ee9bdb4283e656","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/381/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/381/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/issues/381/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/statuses/9bc9f8975ff7a40409dbc79f95c94a373c7ddf60","head":{"label":"DominicKramer:fix/refuse-to-start-at-root","ref":"fix/refuse-to-start-at-root","sha":"9bc9f8975ff7a40409dbc79f95c94a373c7ddf60","user":{"login":"DominicKramer","id":14253877,"avatar_url":"https://avatars3.githubusercontent.com/u/14253877?v=4","gravatar_id":"","url":"https://api.github.com/users/DominicKramer","html_url":"https://github.com/DominicKramer","followers_url":"https://api.github.com/users/DominicKramer/followers","following_url":"https://api.github.com/users/DominicKramer/following{/other_user}","gists_url":"https://api.github.com/users/DominicKramer/gists{/gist_id}","starred_url":"https://api.github.com/users/DominicKramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DominicKramer/subscriptions","organizations_url":"https://api.github.com/users/DominicKramer/orgs","repos_url":"https://api.github.com/users/DominicKramer/repos","events_url":"https://api.github.com/users/DominicKramer/events{/privacy}","received_events_url":"https://api.github.com/users/DominicKramer/received_events","type":"User","site_admin":false},"repo":{"id":68839456,"name":"cloud-debug-nodejs","full_name":"DominicKramer/cloud-debug-nodejs","owner":{"login":"DominicKramer","id":14253877,"avatar_url":"https://avatars3.githubusercontent.com/u/14253877?v=4","gravatar_id":"","url":"https://api.github.com/users/DominicKramer","html_url":"https://github.com/DominicKramer","followers_url":"https://api.github.com/users/DominicKramer/followers","following_url":"https://api.github.com/users/DominicKramer/following{/other_user}","gists_url":"https://api.github.com/users/DominicKramer/gists{/gist_id}","starred_url":"https://api.github.com/users/DominicKramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DominicKramer/subscriptions","organizations_url":"https://api.github.com/users/DominicKramer/orgs","repos_url":"https://api.github.com/users/DominicKramer/repos","events_url":"https://api.github.com/users/DominicKramer/events{/privacy}","received_events_url":"https://api.github.com/users/DominicKramer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DominicKramer/cloud-debug-nodejs","description":"Node.js library for Stackdriver Debugger: investigate your code’s behavior in production","fork":true,"url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs","forks_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/forks","keys_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/teams","hooks_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/hooks","issue_events_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/events","assignees_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/tags","blobs_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/languages","stargazers_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/stargazers","contributors_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/contributors","subscribers_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/subscribers","subscription_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/subscription","commits_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/merges","archive_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/downloads","issues_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/labels{/name}","releases_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/DominicKramer/cloud-debug-nodejs/deployments","created_at":"2016-09-21T17:07:10Z","updated_at":"2017-07-31T23:45:15Z","pushed_at":"2017-12-20T22:22:37Z","git_url":"git://github.com/DominicKramer/cloud-debug-nodejs.git","ssh_url":"git@github.com:DominicKramer/cloud-debug-nodejs.git","clone_url":"https://github.com/DominicKramer/cloud-debug-nodejs.git","svn_url":"https://github.com/DominicKramer/cloud-debug-nodejs","homepage":"https://cloud.google.com/debugger/","size":3136,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"5c93c445b6793bc923a5d46a7691ddd68e70d03d","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":34679272,"name":"cloud-debug-nodejs","full_name":"GoogleCloudPlatform/cloud-debug-nodejs","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/cloud-debug-nodejs","description":"Node.js agent for Stackdriver Debugger: investigate your code’s behavior in production","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/deployments","created_at":"2015-04-27T16:57:45Z","updated_at":"2017-12-20T18:33:32Z","pushed_at":"2017-12-20T22:22:38Z","git_url":"git://github.com/GoogleCloudPlatform/cloud-debug-nodejs.git","ssh_url":"git@github.com:GoogleCloudPlatform/cloud-debug-nodejs.git","clone_url":"https://github.com/GoogleCloudPlatform/cloud-debug-nodejs.git","svn_url":"https://github.com/GoogleCloudPlatform/cloud-debug-nodejs","homepage":"https://cloud.google.com/debugger/","size":2924,"stargazers_count":111,"watchers_count":111,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":31,"open_issues":4,"watchers":111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/381"},"html":{"href":"https://github.com/GoogleCloudPlatform/cloud-debug-nodejs/pull/381"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/issues/381"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/issues/381/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/381/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/pulls/381/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/cloud-debug-nodejs/statuses/9bc9f8975ff7a40409dbc79f95c94a373c7ddf60"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"DominicKramer"}}