fix(tools): inccorect quiz challenge location when running create-new-language-block (#63929)

This commit is contained in:
Diem-Trang Pham
2025-11-17 18:21:27 -06:00
committed by GitHub
parent c91913fbef
commit 36be0f75bf

View File

@@ -211,10 +211,11 @@ async function createQuizChallenge(
questionCount: number,
challengeLang: string
): Promise<ObjectID> {
const newChallengeDir = path.resolve(
__dirname,
`../../curriculum/challenges/english/${block}`
);
const { blockContentDir } = getContentConfig('english') as {
blockContentDir: string;
};
const newChallengeDir = path.resolve(blockContentDir, block);
if (!existsSync(newChallengeDir)) {
await withTrace(fs.mkdir, newChallengeDir);
}