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
Branches
Tags
No related merge requests found
...@@ -4,7 +4,7 @@ import path from 'path'; ...@@ -4,7 +4,7 @@ import path from 'path';
class Config { class Config {
public readonly folders: { public readonly folders: {
project: string; resultsVolume: string; resultsDojo: string; resultsExercice: string; artifacts: string; project: string; resultsVolume: string; resultsDojo: string; resultsExercice: string;
}; };
public readonly exercice: { public readonly exercice: {
...@@ -17,11 +17,10 @@ class Config { ...@@ -17,11 +17,10 @@ class Config {
constructor() { constructor() {
this.folders = { this.folders = {
project : process.env.FILES_FOLDER || './', project : process.env.FILES_FOLDER?.convertWithEnvVars() ?? './',
resultsVolume : process.env.RESULTS_VOLUME || '', resultsVolume : process.env.RESULTS_VOLUME?.convertWithEnvVars() ?? '',
resultsDojo : path.join(process.env.RESULTS_VOLUME || '', 'Dojo/'), resultsDojo : path.join(process.env.RESULTS_VOLUME?.convertWithEnvVars() ?? '', 'Dojo/'),
resultsExercice: path.join(process.env.RESULTS_VOLUME || '', 'Exercice/'), resultsExercice: path.join(process.env.RESULTS_VOLUME?.convertWithEnvVars() ?? '', 'Exercice/')
artifacts : process.env.ARTIFACTS_FOLDER || ''
}; };
this.resetResultsVolume(); 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