{"action":"created","comment":{"url":"https://api.github.com/repos/marktext/marktext/pulls/comments/177925213","pull_request_review_id":107892276,"id":177925213,"diff_hunk":"@@ -42,3 +42,14 @@ export const isFile = filepath => {\n export const isMarkdownFile = filepath => {\n   return isFile(filepath) && hasMarkdownExtension(filepath)\n }\n+\n+// creates a directory if it doesn't already exist.\n+export const mkdir = function (dirPath) {\n+  try {\n+    fs.mkdirSync(dirPath)\n+  } catch (e) {\n+    if (e.code !== 'EEXIST') {\n+      throw e","path":"src/main/utils.js","position":11,"original_position":11,"commit_id":"bb6e030201de228799cc3526a6d09db2e5b62232","original_commit_id":"bb6e030201de228799cc3526a6d09db2e5b62232","user":{"login":"Jocs","id":9712830,"avatar_url":"https://avatars0.githubusercontent.com/u/9712830?v=4","gravatar_id":"","url":"https://api.github.com/users/Jocs","html_url":"https://github.com/Jocs","followers_url":"https://api.github.com/users/Jocs/followers","following_url":"https://api.github.com/users/Jocs/following{/other_user}","gists_url":"https://api.github.com/users/Jocs/gists{/gist_id}","starred_url":"https://api.github.com/users/Jocs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jocs/subscriptions","organizations_url":"https://api.github.com/users/Jocs/orgs","repos_url":"https://api.github.com/users/Jocs/repos","events_url":"https://api.github.com/users/Jocs/events{/privacy}","received_events_url":"https://api.github.com/users/Jocs/received_events","type":"User","site_admin":false},"body":"use `log` method to write error log to `log file`","created_at":"2018-03-29T00:17:24Z","updated_at":"2018-03-29T00:18:06Z","html_url":"https://github.com/marktext/marktext/pull/93#discussion_r177925213","pull_request_url":"https://api.github.com/repos/marktext/marktext/pulls/93","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/marktext/marktext/pulls/comments/177925213"},"html":{"href":"https://github.com/marktext/marktext/pull/93#discussion_r177925213"},"pull_request":{"href":"https://api.github.com/repos/marktext/marktext/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/marktext/marktext/pulls/93","id":178162565,"html_url":"https://github.com/marktext/marktext/pull/93","diff_url":"https://github.com/marktext/marktext/pull/93.diff","patch_url":"https://github.com/marktext/marktext/pull/93.patch","issue_url":"https://api.github.com/repos/marktext/marktext/issues/93","number":93,"state":"open","locked":false,"title":"Fix crash on first launch (#78, #90)","user":{"login":"fxha","id":22716132,"avatar_url":"https://avatars1.githubusercontent.com/u/22716132?v=4","gravatar_id":"","url":"https://api.github.com/users/fxha","html_url":"https://github.com/fxha","followers_url":"https://api.github.com/users/fxha/followers","following_url":"https://api.github.com/users/fxha/following{/other_user}","gists_url":"https://api.github.com/users/fxha/gists{/gist_id}","starred_url":"https://api.github.com/users/fxha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxha/subscriptions","organizations_url":"https://api.github.com/users/fxha/orgs","repos_url":"https://api.github.com/users/fxha/repos","events_url":"https://api.github.com/users/fxha/events{/privacy}","received_events_url":"https://api.github.com/users/fxha/received_events","type":"User","site_admin":false},"body":"| Q                | A\r\n| ---------------- | ---\r\n| Bug fix?         | yes\r\n| Fixed tickets    | #78 and #90\r\n| License          | MIT","created_at":"2018-03-28T20:59:50Z","updated_at":"2018-03-29T00:18:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82f9de9a96f3278762591343f52aae6645f484e2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/marktext/marktext/pulls/93/commits","review_comments_url":"https://api.github.com/repos/marktext/marktext/pulls/93/comments","review_comment_url":"https://api.github.com/repos/marktext/marktext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/marktext/marktext/issues/93/comments","statuses_url":"https://api.github.com/repos/marktext/marktext/statuses/bb6e030201de228799cc3526a6d09db2e5b62232","head":{"label":"fxha:FixStartupCrash","ref":"FixStartupCrash","sha":"bb6e030201de228799cc3526a6d09db2e5b62232","user":{"login":"fxha","id":22716132,"avatar_url":"https://avatars1.githubusercontent.com/u/22716132?v=4","gravatar_id":"","url":"https://api.github.com/users/fxha","html_url":"https://github.com/fxha","followers_url":"https://api.github.com/users/fxha/followers","following_url":"https://api.github.com/users/fxha/following{/other_user}","gists_url":"https://api.github.com/users/fxha/gists{/gist_id}","starred_url":"https://api.github.com/users/fxha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxha/subscriptions","organizations_url":"https://api.github.com/users/fxha/orgs","repos_url":"https://api.github.com/users/fxha/repos","events_url":"https://api.github.com/users/fxha/events{/privacy}","received_events_url":"https://api.github.com/users/fxha/received_events","type":"User","site_admin":false},"repo":{"id":126064438,"name":"marktext","full_name":"fxha/marktext","owner":{"login":"fxha","id":22716132,"avatar_url":"https://avatars1.githubusercontent.com/u/22716132?v=4","gravatar_id":"","url":"https://api.github.com/users/fxha","html_url":"https://github.com/fxha","followers_url":"https://api.github.com/users/fxha/followers","following_url":"https://api.github.com/users/fxha/following{/other_user}","gists_url":"https://api.github.com/users/fxha/gists{/gist_id}","starred_url":"https://api.github.com/users/fxha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxha/subscriptions","organizations_url":"https://api.github.com/users/fxha/orgs","repos_url":"https://api.github.com/users/fxha/repos","events_url":"https://api.github.com/users/fxha/events{/privacy}","received_events_url":"https://api.github.com/users/fxha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fxha/marktext","description":"📝Next generation markdown editor, running on platforms of MacOS Windows and Linux.","fork":true,"url":"https://api.github.com/repos/fxha/marktext","forks_url":"https://api.github.com/repos/fxha/marktext/forks","keys_url":"https://api.github.com/repos/fxha/marktext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fxha/marktext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fxha/marktext/teams","hooks_url":"https://api.github.com/repos/fxha/marktext/hooks","issue_events_url":"https://api.github.com/repos/fxha/marktext/issues/events{/number}","events_url":"https://api.github.com/repos/fxha/marktext/events","assignees_url":"https://api.github.com/repos/fxha/marktext/assignees{/user}","branches_url":"https://api.github.com/repos/fxha/marktext/branches{/branch}","tags_url":"https://api.github.com/repos/fxha/marktext/tags","blobs_url":"https://api.github.com/repos/fxha/marktext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fxha/marktext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fxha/marktext/git/refs{/sha}","trees_url":"https://api.github.com/repos/fxha/marktext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fxha/marktext/statuses/{sha}","languages_url":"https://api.github.com/repos/fxha/marktext/languages","stargazers_url":"https://api.github.com/repos/fxha/marktext/stargazers","contributors_url":"https://api.github.com/repos/fxha/marktext/contributors","subscribers_url":"https://api.github.com/repos/fxha/marktext/subscribers","subscription_url":"https://api.github.com/repos/fxha/marktext/subscription","commits_url":"https://api.github.com/repos/fxha/marktext/commits{/sha}","git_commits_url":"https://api.github.com/repos/fxha/marktext/git/commits{/sha}","comments_url":"https://api.github.com/repos/fxha/marktext/comments{/number}","issue_comment_url":"https://api.github.com/repos/fxha/marktext/issues/comments{/number}","contents_url":"https://api.github.com/repos/fxha/marktext/contents/{+path}","compare_url":"https://api.github.com/repos/fxha/marktext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fxha/marktext/merges","archive_url":"https://api.github.com/repos/fxha/marktext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fxha/marktext/downloads","issues_url":"https://api.github.com/repos/fxha/marktext/issues{/number}","pulls_url":"https://api.github.com/repos/fxha/marktext/pulls{/number}","milestones_url":"https://api.github.com/repos/fxha/marktext/milestones{/number}","notifications_url":"https://api.github.com/repos/fxha/marktext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fxha/marktext/labels{/name}","releases_url":"https://api.github.com/repos/fxha/marktext/releases{/id}","deployments_url":"https://api.github.com/repos/fxha/marktext/deployments","created_at":"2018-03-20T18:27:51Z","updated_at":"2018-03-28T11:12:11Z","pushed_at":"2018-03-28T20:58:43Z","git_url":"git://github.com/fxha/marktext.git","ssh_url":"git@github.com:fxha/marktext.git","clone_url":"https://github.com/fxha/marktext.git","svn_url":"https://github.com/fxha/marktext","homepage":"https://marktext.github.io/website/","size":51958,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"marktext:master","ref":"master","sha":"05ddf6374ca4fc0181104252415488384df54afc","user":{"login":"marktext","id":36623013,"avatar_url":"https://avatars0.githubusercontent.com/u/36623013?v=4","gravatar_id":"","url":"https://api.github.com/users/marktext","html_url":"https://github.com/marktext","followers_url":"https://api.github.com/users/marktext/followers","following_url":"https://api.github.com/users/marktext/following{/other_user}","gists_url":"https://api.github.com/users/marktext/gists{/gist_id}","starred_url":"https://api.github.com/users/marktext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marktext/subscriptions","organizations_url":"https://api.github.com/users/marktext/orgs","repos_url":"https://api.github.com/users/marktext/repos","events_url":"https://api.github.com/users/marktext/events{/privacy}","received_events_url":"https://api.github.com/users/marktext/received_events","type":"Organization","site_admin":false},"repo":{"id":110446844,"name":"marktext","full_name":"marktext/marktext","owner":{"login":"marktext","id":36623013,"avatar_url":"https://avatars0.githubusercontent.com/u/36623013?v=4","gravatar_id":"","url":"https://api.github.com/users/marktext","html_url":"https://github.com/marktext","followers_url":"https://api.github.com/users/marktext/followers","following_url":"https://api.github.com/users/marktext/following{/other_user}","gists_url":"https://api.github.com/users/marktext/gists{/gist_id}","starred_url":"https://api.github.com/users/marktext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marktext/subscriptions","organizations_url":"https://api.github.com/users/marktext/orgs","repos_url":"https://api.github.com/users/marktext/repos","events_url":"https://api.github.com/users/marktext/events{/privacy}","received_events_url":"https://api.github.com/users/marktext/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/marktext/marktext","description":"📝Next generation markdown editor, running on platforms of MacOS Windows and Linux.","fork":false,"url":"https://api.github.com/repos/marktext/marktext","forks_url":"https://api.github.com/repos/marktext/marktext/forks","keys_url":"https://api.github.com/repos/marktext/marktext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marktext/marktext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marktext/marktext/teams","hooks_url":"https://api.github.com/repos/marktext/marktext/hooks","issue_events_url":"https://api.github.com/repos/marktext/marktext/issues/events{/number}","events_url":"https://api.github.com/repos/marktext/marktext/events","assignees_url":"https://api.github.com/repos/marktext/marktext/assignees{/user}","branches_url":"https://api.github.com/repos/marktext/marktext/branches{/branch}","tags_url":"https://api.github.com/repos/marktext/marktext/tags","blobs_url":"https://api.github.com/repos/marktext/marktext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marktext/marktext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marktext/marktext/git/refs{/sha}","trees_url":"https://api.github.com/repos/marktext/marktext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marktext/marktext/statuses/{sha}","languages_url":"https://api.github.com/repos/marktext/marktext/languages","stargazers_url":"https://api.github.com/repos/marktext/marktext/stargazers","contributors_url":"https://api.github.com/repos/marktext/marktext/contributors","subscribers_url":"https://api.github.com/repos/marktext/marktext/subscribers","subscription_url":"https://api.github.com/repos/marktext/marktext/subscription","commits_url":"https://api.github.com/repos/marktext/marktext/commits{/sha}","git_commits_url":"https://api.github.com/repos/marktext/marktext/git/commits{/sha}","comments_url":"https://api.github.com/repos/marktext/marktext/comments{/number}","issue_comment_url":"https://api.github.com/repos/marktext/marktext/issues/comments{/number}","contents_url":"https://api.github.com/repos/marktext/marktext/contents/{+path}","compare_url":"https://api.github.com/repos/marktext/marktext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marktext/marktext/merges","archive_url":"https://api.github.com/repos/marktext/marktext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marktext/marktext/downloads","issues_url":"https://api.github.com/repos/marktext/marktext/issues{/number}","pulls_url":"https://api.github.com/repos/marktext/marktext/pulls{/number}","milestones_url":"https://api.github.com/repos/marktext/marktext/milestones{/number}","notifications_url":"https://api.github.com/repos/marktext/marktext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marktext/marktext/labels{/name}","releases_url":"https://api.github.com/repos/marktext/marktext/releases{/id}","deployments_url":"https://api.github.com/repos/marktext/marktext/deployments","created_at":"2017-11-12T16:05:25Z","updated_at":"2018-03-28T23:37:45Z","pushed_at":"2018-03-28T20:59:52Z","git_url":"git://github.com/marktext/marktext.git","ssh_url":"git@github.com:marktext/marktext.git","clone_url":"https://github.com/marktext/marktext.git","svn_url":"https://github.com/marktext/marktext","homepage":"https://marktext.github.io/website/","size":52151,"stargazers_count":1458,"watchers_count":1458,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":59,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":59,"open_issues":24,"watchers":1458,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/marktext/marktext/pulls/93"},"html":{"href":"https://github.com/marktext/marktext/pull/93"},"issue":{"href":"https://api.github.com/repos/marktext/marktext/issues/93"},"comments":{"href":"https://api.github.com/repos/marktext/marktext/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/marktext/marktext/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/marktext/marktext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/marktext/marktext/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/marktext/marktext/statuses/bb6e030201de228799cc3526a6d09db2e5b62232"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Jocs"}}