{"action":"created","comment":{"url":"https://api.github.com/repos/learningequality/installers/pulls/comments/45749852","id":45749852,"diff_hunk":"@@ -207,9 +220,14 @@ - (void) runTask:(NSString *)command {\n \n \n NSString *getDatabasePath() {\n-    // Defaults to ~/.kalite/ folder so check there for now.\n-    // TODO(cpauya): Use the KALITE_HOME env var if it exists.\n-    NSString *database = @\"~/.kalite/database/data.sqlite\";\n+    NSString *database;\n+    NSString* envKaliteHomeStr = getEnvVar(@\"KALITE_HOME\");\n+    database = [NSString stringWithFormat:@\"%@%@\", envKaliteHomeStr, @\"/database/data.sqlite\"];","path":"osx/KA-Lite/KA-Lite/AppDelegate.m","position":82,"original_position":82,"commit_id":"012385e1545e78bf5ca90631a45f3cce7a6e40dd","original_commit_id":"012385e1545e78bf5ca90631a45f3cce7a6e40dd","user":{"login":"cpauya","id":175580,"avatar_url":"https://avatars.githubusercontent.com/u/175580?v=3","gravatar_id":"","url":"https://api.github.com/users/cpauya","html_url":"https://github.com/cpauya","followers_url":"https://api.github.com/users/cpauya/followers","following_url":"https://api.github.com/users/cpauya/following{/other_user}","gists_url":"https://api.github.com/users/cpauya/gists{/gist_id}","starred_url":"https://api.github.com/users/cpauya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpauya/subscriptions","organizations_url":"https://api.github.com/users/cpauya/orgs","repos_url":"https://api.github.com/users/cpauya/repos","events_url":"https://api.github.com/users/cpauya/events{/privacy}","received_events_url":"https://api.github.com/users/cpauya/received_events","type":"User","site_admin":false},"body":"This line must be moved inside the `if` statement below because it's overwritten if `KALITE_HOME` env var is not set.","created_at":"2015-11-24T15:31:26Z","updated_at":"2015-11-24T15:31:26Z","html_url":"https://github.com/learningequality/installers/pull/281#discussion_r45749852","pull_request_url":"https://api.github.com/repos/learningequality/installers/pulls/281","_links":{"self":{"href":"https://api.github.com/repos/learningequality/installers/pulls/comments/45749852"},"html":{"href":"https://github.com/learningequality/installers/pull/281#discussion_r45749852"},"pull_request":{"href":"https://api.github.com/repos/learningequality/installers/pulls/281"}}},"pull_request":{"url":"https://api.github.com/repos/learningequality/installers/pulls/281","id":51550918,"html_url":"https://github.com/learningequality/installers/pull/281","diff_url":"https://github.com/learningequality/installers/pull/281.diff","patch_url":"https://github.com/learningequality/installers/pull/281.patch","issue_url":"https://api.github.com/repos/learningequality/installers/issues/281","number":281,"state":"open","locked":false,"title":"Implement custom paths in preferences window","user":{"login":"amodia","id":8663934,"avatar_url":"https://avatars.githubusercontent.com/u/8663934?v=3","gravatar_id":"","url":"https://api.github.com/users/amodia","html_url":"https://github.com/amodia","followers_url":"https://api.github.com/users/amodia/followers","following_url":"https://api.github.com/users/amodia/following{/other_user}","gists_url":"https://api.github.com/users/amodia/gists{/gist_id}","starred_url":"https://api.github.com/users/amodia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amodia/subscriptions","organizations_url":"https://api.github.com/users/amodia/orgs","repos_url":"https://api.github.com/users/amodia/repos","events_url":"https://api.github.com/users/amodia/events{/privacy}","received_events_url":"https://api.github.com/users/amodia/received_events","type":"User","site_admin":false},"body":"@cpauya this fixes #279 \r\n\r\nI attached a sample screenshot of the preferences menu.\r\n\r\n![screen shot 2015-11-24 at 1 02 04 am](https://cloud.githubusercontent.com/assets/8663934/11343453/205a90e8-9247-11e5-8257-66141f926ab3.png)\r\n\r\n\r\n","created_at":"2015-11-23T17:05:25Z","updated_at":"2015-11-24T15:31:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0628c17f890c2a018a552ad9ce526c86e5197b4b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/learningequality/installers/pulls/281/commits","review_comments_url":"https://api.github.com/repos/learningequality/installers/pulls/281/comments","review_comment_url":"https://api.github.com/repos/learningequality/installers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learningequality/installers/issues/281/comments","statuses_url":"https://api.github.com/repos/learningequality/installers/statuses/012385e1545e78bf5ca90631a45f3cce7a6e40dd","head":{"label":"mrpau:feature/279-implement-custom-paths-in-preferences-window","ref":"feature/279-implement-custom-paths-in-preferences-window","sha":"012385e1545e78bf5ca90631a45f3cce7a6e40dd","user":{"login":"mrpau","id":8663898,"avatar_url":"https://avatars.githubusercontent.com/u/8663898?v=3","gravatar_id":"","url":"https://api.github.com/users/mrpau","html_url":"https://github.com/mrpau","followers_url":"https://api.github.com/users/mrpau/followers","following_url":"https://api.github.com/users/mrpau/following{/other_user}","gists_url":"https://api.github.com/users/mrpau/gists{/gist_id}","starred_url":"https://api.github.com/users/mrpau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrpau/subscriptions","organizations_url":"https://api.github.com/users/mrpau/orgs","repos_url":"https://api.github.com/users/mrpau/repos","events_url":"https://api.github.com/users/mrpau/events{/privacy}","received_events_url":"https://api.github.com/users/mrpau/received_events","type":"Organization","site_admin":false},"repo":{"id":27742073,"name":"installers","full_name":"mrpau/installers","owner":{"login":"mrpau","id":8663898,"avatar_url":"https://avatars.githubusercontent.com/u/8663898?v=3","gravatar_id":"","url":"https://api.github.com/users/mrpau","html_url":"https://github.com/mrpau","followers_url":"https://api.github.com/users/mrpau/followers","following_url":"https://api.github.com/users/mrpau/following{/other_user}","gists_url":"https://api.github.com/users/mrpau/gists{/gist_id}","starred_url":"https://api.github.com/users/mrpau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrpau/subscriptions","organizations_url":"https://api.github.com/users/mrpau/orgs","repos_url":"https://api.github.com/users/mrpau/repos","events_url":"https://api.github.com/users/mrpau/events{/privacy}","received_events_url":"https://api.github.com/users/mrpau/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mrpau/installers","description":"Various platform-specific installers and supporting scripts for KA Lite","fork":true,"url":"https://api.github.com/repos/mrpau/installers","forks_url":"https://api.github.com/repos/mrpau/installers/forks","keys_url":"https://api.github.com/repos/mrpau/installers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mrpau/installers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mrpau/installers/teams","hooks_url":"https://api.github.com/repos/mrpau/installers/hooks","issue_events_url":"https://api.github.com/repos/mrpau/installers/issues/events{/number}","events_url":"https://api.github.com/repos/mrpau/installers/events","assignees_url":"https://api.github.com/repos/mrpau/installers/assignees{/user}","branches_url":"https://api.github.com/repos/mrpau/installers/branches{/branch}","tags_url":"https://api.github.com/repos/mrpau/installers/tags","blobs_url":"https://api.github.com/repos/mrpau/installers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mrpau/installers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mrpau/installers/git/refs{/sha}","trees_url":"https://api.github.com/repos/mrpau/installers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mrpau/installers/statuses/{sha}","languages_url":"https://api.github.com/repos/mrpau/installers/languages","stargazers_url":"https://api.github.com/repos/mrpau/installers/stargazers","contributors_url":"https://api.github.com/repos/mrpau/installers/contributors","subscribers_url":"https://api.github.com/repos/mrpau/installers/subscribers","subscription_url":"https://api.github.com/repos/mrpau/installers/subscription","commits_url":"https://api.github.com/repos/mrpau/installers/commits{/sha}","git_commits_url":"https://api.github.com/repos/mrpau/installers/git/commits{/sha}","comments_url":"https://api.github.com/repos/mrpau/installers/comments{/number}","issue_comment_url":"https://api.github.com/repos/mrpau/installers/issues/comments{/number}","contents_url":"https://api.github.com/repos/mrpau/installers/contents/{+path}","compare_url":"https://api.github.com/repos/mrpau/installers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mrpau/installers/merges","archive_url":"https://api.github.com/repos/mrpau/installers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mrpau/installers/downloads","issues_url":"https://api.github.com/repos/mrpau/installers/issues{/number}","pulls_url":"https://api.github.com/repos/mrpau/installers/pulls{/number}","milestones_url":"https://api.github.com/repos/mrpau/installers/milestones{/number}","notifications_url":"https://api.github.com/repos/mrpau/installers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mrpau/installers/labels{/name}","releases_url":"https://api.github.com/repos/mrpau/installers/releases{/id}","created_at":"2014-12-09T00:31:59Z","updated_at":"2015-09-03T00:39:19Z","pushed_at":"2015-11-24T15:12:00Z","git_url":"git://github.com/mrpau/installers.git","ssh_url":"git@github.com:mrpau/installers.git","clone_url":"https://github.com/mrpau/installers.git","svn_url":"https://github.com/mrpau/installers","homepage":null,"size":47336,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","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":0,"default_branch":"master"}},"base":{"label":"learningequality:feature/osx-0.16.x","ref":"feature/osx-0.16.x","sha":"a93fc9b21919e67b640a5b785de273ca2e9cb672","user":{"login":"learningequality","id":3926525,"avatar_url":"https://avatars.githubusercontent.com/u/3926525?v=3","gravatar_id":"","url":"https://api.github.com/users/learningequality","html_url":"https://github.com/learningequality","followers_url":"https://api.github.com/users/learningequality/followers","following_url":"https://api.github.com/users/learningequality/following{/other_user}","gists_url":"https://api.github.com/users/learningequality/gists{/gist_id}","starred_url":"https://api.github.com/users/learningequality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learningequality/subscriptions","organizations_url":"https://api.github.com/users/learningequality/orgs","repos_url":"https://api.github.com/users/learningequality/repos","events_url":"https://api.github.com/users/learningequality/events{/privacy}","received_events_url":"https://api.github.com/users/learningequality/received_events","type":"Organization","site_admin":false},"repo":{"id":27731269,"name":"installers","full_name":"learningequality/installers","owner":{"login":"learningequality","id":3926525,"avatar_url":"https://avatars.githubusercontent.com/u/3926525?v=3","gravatar_id":"","url":"https://api.github.com/users/learningequality","html_url":"https://github.com/learningequality","followers_url":"https://api.github.com/users/learningequality/followers","following_url":"https://api.github.com/users/learningequality/following{/other_user}","gists_url":"https://api.github.com/users/learningequality/gists{/gist_id}","starred_url":"https://api.github.com/users/learningequality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learningequality/subscriptions","organizations_url":"https://api.github.com/users/learningequality/orgs","repos_url":"https://api.github.com/users/learningequality/repos","events_url":"https://api.github.com/users/learningequality/events{/privacy}","received_events_url":"https://api.github.com/users/learningequality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learningequality/installers","description":"Various platform-specific installers and supporting scripts for KA Lite","fork":false,"url":"https://api.github.com/repos/learningequality/installers","forks_url":"https://api.github.com/repos/learningequality/installers/forks","keys_url":"https://api.github.com/repos/learningequality/installers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learningequality/installers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learningequality/installers/teams","hooks_url":"https://api.github.com/repos/learningequality/installers/hooks","issue_events_url":"https://api.github.com/repos/learningequality/installers/issues/events{/number}","events_url":"https://api.github.com/repos/learningequality/installers/events","assignees_url":"https://api.github.com/repos/learningequality/installers/assignees{/user}","branches_url":"https://api.github.com/repos/learningequality/installers/branches{/branch}","tags_url":"https://api.github.com/repos/learningequality/installers/tags","blobs_url":"https://api.github.com/repos/learningequality/installers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learningequality/installers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learningequality/installers/git/refs{/sha}","trees_url":"https://api.github.com/repos/learningequality/installers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learningequality/installers/statuses/{sha}","languages_url":"https://api.github.com/repos/learningequality/installers/languages","stargazers_url":"https://api.github.com/repos/learningequality/installers/stargazers","contributors_url":"https://api.github.com/repos/learningequality/installers/contributors","subscribers_url":"https://api.github.com/repos/learningequality/installers/subscribers","subscription_url":"https://api.github.com/repos/learningequality/installers/subscription","commits_url":"https://api.github.com/repos/learningequality/installers/commits{/sha}","git_commits_url":"https://api.github.com/repos/learningequality/installers/git/commits{/sha}","comments_url":"https://api.github.com/repos/learningequality/installers/comments{/number}","issue_comment_url":"https://api.github.com/repos/learningequality/installers/issues/comments{/number}","contents_url":"https://api.github.com/repos/learningequality/installers/contents/{+path}","compare_url":"https://api.github.com/repos/learningequality/installers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learningequality/installers/merges","archive_url":"https://api.github.com/repos/learningequality/installers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learningequality/installers/downloads","issues_url":"https://api.github.com/repos/learningequality/installers/issues{/number}","pulls_url":"https://api.github.com/repos/learningequality/installers/pulls{/number}","milestones_url":"https://api.github.com/repos/learningequality/installers/milestones{/number}","notifications_url":"https://api.github.com/repos/learningequality/installers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learningequality/installers/labels{/name}","releases_url":"https://api.github.com/repos/learningequality/installers/releases{/id}","created_at":"2014-12-08T19:32:28Z","updated_at":"2015-09-02T15:23:29Z","pushed_at":"2015-11-24T15:12:00Z","git_url":"git://github.com/learningequality/installers.git","ssh_url":"git@github.com:learningequality/installers.git","clone_url":"https://github.com/learningequality/installers.git","svn_url":"https://github.com/learningequality/installers","homepage":null,"size":37098,"stargazers_count":4,"watchers_count":4,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":67,"forks":8,"open_issues":67,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learningequality/installers/pulls/281"},"html":{"href":"https://github.com/learningequality/installers/pull/281"},"issue":{"href":"https://api.github.com/repos/learningequality/installers/issues/281"},"comments":{"href":"https://api.github.com/repos/learningequality/installers/issues/281/comments"},"review_comments":{"href":"https://api.github.com/repos/learningequality/installers/pulls/281/comments"},"review_comment":{"href":"https://api.github.com/repos/learningequality/installers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learningequality/installers/pulls/281/commits"},"statuses":{"href":"https://api.github.com/repos/learningequality/installers/statuses/012385e1545e78bf5ca90631a45f3cce7a6e40dd"}}}}