Update tsp-generator.ts to protect temp file and location file for CLI (#1369)
This commit is contained in:
Родитель
15e249061c
Коммит
6922d41954
|
@ -28,6 +28,8 @@ async function clearOutputFiles(state: ModelState<PwshModel>) {
|
|||
const resourcesFolder: string = await state.getValue('resources-folder');
|
||||
const uxFolder: string = await state.getValue('ux-folder');
|
||||
const readme = './README.md';
|
||||
const tempTypeSpecFiles = './TempTypeSpecFiles';
|
||||
const tspLocation = './tsp-location.yaml';
|
||||
|
||||
const protectFiles = new Set<string>();
|
||||
protectFiles.add(psd1);
|
||||
|
@ -38,6 +40,8 @@ async function clearOutputFiles(state: ModelState<PwshModel>) {
|
|||
protectFiles.add(resourcesFolder);
|
||||
protectFiles.add(uxFolder);
|
||||
protectFiles.add(readme);
|
||||
protectFiles.add(tempTypeSpecFiles);
|
||||
protectFiles.add(tspLocation);
|
||||
await clearFolder(outputFolder, [...protectFiles].map((each) => resolveUri(outputFolder, each)));
|
||||
}
|
||||
return;
|
||||
|
@ -60,4 +64,4 @@ export async function generatePwshModule(pwshModel: PwshModel, emitterOptions: a
|
|||
await llcsharpV2(tspService, state);
|
||||
await powershellV2(tspService, state);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче