From 67d7930aef79f6e210a00b7d026e7b2ffcf0ddbb Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 1 Feb 2018 20:35:18 +0000 Subject: [PATCH] Remember to disable projects in editor when git not found --- red/runtime/storage/localfilesystem/projects/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/red/runtime/storage/localfilesystem/projects/index.js b/red/runtime/storage/localfilesystem/projects/index.js index ecccee581..3499de90b 100644 --- a/red/runtime/storage/localfilesystem/projects/index.js +++ b/red/runtime/storage/localfilesystem/projects/index.js @@ -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);