fix: build on Windows (#18831)

This commit is contained in:
Valeriy
2018-10-25 12:54:57 +03:00
committed by mrugesh mohapatra
parent e1335d774b
commit bad6fc3e53
2 changed files with 7 additions and 6 deletions

View File

@ -47,6 +47,7 @@ async function buildCurriculum(file, curriculum) {
challengeBlock = curriculum[superBlock].blocks[block];
} catch (e) {
console.log(superBlock, block);
// eslint-disable-next-line no-process-exit
process.exit(0);
}
const { meta } = challengeBlock;
@ -64,7 +65,7 @@ async function buildCurriculum(file, curriculum) {
}
function superBlockInfoFromPath(filePath) {
const [maybeSuper] = filePath.split('/');
const [maybeSuper] = filePath.split(path.sep);
return superBlockInfo(maybeSuper);
}
@ -82,6 +83,6 @@ function superBlockInfo(fileName) {
}
function getBlockNameFromPath(filePath) {
const [, block] = filePath.split('/');
const [, block] = filePath.split(path.sep);
return block;
}