Commit ef860538 authored by Guillaume Lebigot's avatar Guillaume Lebigot

Déplacement du check des binaires dans le launcher plutôt que dans config

parent 80063c69
......@@ -8,9 +8,8 @@ import {address} from 'ip';
import logger from 'winston';
require('winston-daily-rotate-file');
import {asyncExists, asyncReadFile, asyncRequired} from './files';
import {checkBinaries} from './binchecker';
import {emit} from './pubsub';
import {checkBinaries} from './binchecker.js';
/** Object containing all config */
let config = {};
......@@ -37,7 +36,6 @@ export async function initConfig(appPath, argv) {
configureLocale();
await loadConfigFiles(appPath);
configureHost();
await configureBinaries();
return getConfig();
}
......@@ -99,7 +97,7 @@ function configureLocale() {
config = {...config, EngineDefaultLocale: detectedLocale };
}
async function configureBinaries() {
export async function configureBinaries(config) {
logger.info('[Launcher] Checking if binaries are available');
const binaries = await checkBinaries(config);
config = {...config, ...binaries};
......
......@@ -2,8 +2,7 @@
* @fileoverview Launcher source file
*/
import {asyncCheckOrMkdir, asyncExists, asyncRemove, asyncRename, asyncUnlink} from './_common/utils/files';
import {initConfig} from './_common/utils/config';
import {initConfig,configureBinaries} from './_common/utils/config';
import clc from 'cli-color' ;
import {copy} from 'fs-extra';
import path from 'path';
......@@ -79,6 +78,9 @@ async function main() {
logger.info('[Launcher] Loaded configuration file');
logger.debug('[Launcher] Loaded configuration : ' + JSON.stringify(config, null, '\n'));
// Checking binaries
await configureBinaries(config);
// Vérification de l'existence des répertoires, sinon les créer.
await checkPaths(config);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment