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

Replace move function by a copy one

parent 10008351
No related branches found
No related tags found
No related merge requests found
Pipeline #25635 passed
......@@ -34,7 +34,7 @@ import Config from './config/Config';
}
exerciceEnonce.immutable.forEach(immutableFile => {
const filePath = `${ Config.folders.project }/${ immutableFile.file_path }`.replace(/\/\//g, '/');
const filePath = path.join(Config.folders.project, immutableFile.file_path);
fs.mkdirSync(path.dirname(filePath), { recursive: true });
fs.writeFileSync(filePath, immutableFile.content, { encoding: 'base64' });
});
......@@ -100,7 +100,10 @@ import Config from './config/Config';
// Step 8: Exit with container exit code
fs.moveSync(Config.folders.resultsVolume, Config.folders.artifacts, { overwrite: true });
fs.copySync(Config.folders.resultsVolume, Config.folders.artifacts, {
overwrite : true,
preserveTimestamps: true
});
process.exit(containerExitStatus[0]);
})();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment