-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Init projectPath instead of extension manager for better path handling …
- Loading branch information
Showing
3 changed files
with
19 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
import {ExtensionConfigWrapper} from '../../../backend/model/extension/ExtensionConfigWrapper'; | ||
import {PrivateConfigClass} from './PrivateConfigClass'; | ||
import {ConfigClassBuilder} from 'typeconfig/node'; | ||
import {ExtensionConfigTemplateLoader} from '../../../backend/model/extension/ExtensionConfigTemplateLoader'; | ||
import * as path from 'path'; | ||
import {ProjectPath} from '../../../backend/ProjectPath'; | ||
|
||
// we need to know the location of the extensions to load the full config (including the extensions) | ||
const pre = ConfigClassBuilder.attachPrivateInterface(new PrivateConfigClass()); | ||
try { | ||
pre.loadSync({preventSaving: true}); | ||
} catch (e) { /* empty */ | ||
} | ||
ExtensionConfigTemplateLoader.Instance.init(path.join(__dirname, '/../../../../', pre.Extensions.folder)); | ||
// load extension paths before full config load | ||
ProjectPath.init(pre); | ||
|
||
export const Config = ExtensionConfigWrapper.originalSync(true); | ||
// set actual config | ||
ProjectPath.init(Config); |