Remember to disable projects in editor when git not found

This commit is contained in:
Nick O'Leary 2018-02-01 20:35:18 +00:00
parent 6f69995f4e
commit 67d7930aef
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,14 @@ function init(_settings, _runtime) {
if (!gitConfig) {
projectLogMessages.push(log._("storage.localfilesystem.projects.git-not-found"))
projectsEnabled = false;
try {
// As projects have to be turned on, we know this property
// must exist at this point, so turn it off.
// TODO: when on-by-default, this will need to do more
// work to disable.
settings.editorTheme.projects.enabled = false;
} catch(err) {
}
} else {
globalGitUser = gitConfig.user;
Projects.init(settings,runtime);