Skip to content
Snippets Groups Projects
Commit b15610e2 authored by michael.minelli's avatar michael.minelli
Browse files

Config => Use function to complete string with env var calls

parent 97d4f438
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@ import path from 'path';
class Config {
public readonly folders: {
project: string; resultsVolume: string; resultsDojo: string; resultsExercice: string; artifacts: string;
project: string; resultsVolume: string; resultsDojo: string; resultsExercice: string;
};
public readonly exercice: {
......@@ -17,11 +17,10 @@ class Config {
constructor() {
this.folders = {
project : process.env.FILES_FOLDER || './',
resultsVolume : process.env.RESULTS_VOLUME || '',
resultsDojo : path.join(process.env.RESULTS_VOLUME || '', 'Dojo/'),
resultsExercice: path.join(process.env.RESULTS_VOLUME || '', 'Exercice/'),
artifacts : process.env.ARTIFACTS_FOLDER || ''
project : process.env.FILES_FOLDER?.convertWithEnvVars() ?? './',
resultsVolume : process.env.RESULTS_VOLUME?.convertWithEnvVars() ?? '',
resultsDojo : path.join(process.env.RESULTS_VOLUME?.convertWithEnvVars() ?? '', 'Dojo/'),
resultsExercice: path.join(process.env.RESULTS_VOLUME?.convertWithEnvVars() ?? '', 'Exercice/')
};
this.resetResultsVolume();
......
Subproject commit bfca2c401e4b5ff69b0a515fd9dcab49d36ee212
Subproject commit a026c4af16be3ae962b3031546ffac328e19fe50
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment