Merge pull request #6131 from microsoft/master

Fix build and debug active file with no .vscode folder on Linux/Mac. …
This commit is contained in:
Sean McManus
2020-09-13 12:01:19 -07:00
committed by GitHub
+2 -2
View File
@@ -676,8 +676,8 @@ export function writeFileText(filePath: string, content: string, encoding: strin
const folders: string[] = filePath.split(path.sep).slice(0, -1);
if (folders.length) {
// create folder path if it doesn't exist
folders.reduce((last, folder) => {
const folderPath: string = last ? last + path.sep + folder : folder;
folders.reduce((previous, folder) => {
const folderPath: string = previous + path.sep + folder;
if (!fs.existsSync(folderPath)) {
fs.mkdirSync(folderPath);
}