From f7bf914bcbf109eac1162465e43f6030678da04a Mon Sep 17 00:00:00 2001 From: Alex Ma Date: Wed, 14 Jul 2021 14:36:52 -0700 Subject: [PATCH] added on end function to end of pipe (#16144) --- build/lib/locFunc.js | 7 ++++--- build/lib/locFunc.ts | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/build/lib/locFunc.js b/build/lib/locFunc.js index 1f06f5e4ca..df555307d2 100644 --- a/build/lib/locFunc.js +++ b/build/lib/locFunc.js @@ -363,9 +363,10 @@ function renameVscodeLangpacks() { console.log('vscode pack is not in ADS yet: ' + langId); continue; } - gulp.src(`i18n/ads-language-pack-${langId}/*.md`) - .pipe(vfs.dest(locVSCODEFolder, { overwrite: true })) - .end(function () { + gulp.src(path.join(locADSFolder, '*.md')) + .pipe(rename(filepath => filepath.dirname = '')) + .pipe(gulp.dest(locVSCODEFolder)) + .on('end', () => { rimraf.sync(locADSFolder); fs.renameSync(locVSCODEFolder, locADSFolder); }); diff --git a/build/lib/locFunc.ts b/build/lib/locFunc.ts index 1c448119ca..cc199694ae 100644 --- a/build/lib/locFunc.ts +++ b/build/lib/locFunc.ts @@ -387,9 +387,10 @@ export function renameVscodeLangpacks(): Promise { console.log('vscode pack is not in ADS yet: ' + langId); continue; } - gulp.src(`i18n/ads-language-pack-${langId}/*.md`) - .pipe(vfs.dest(locVSCODEFolder, {overwrite: true})) - .end(function () { + gulp.src(path.join(locADSFolder, '*.md')) + .pipe(rename(filepath => filepath.dirname = '')) + .pipe(gulp.dest(locVSCODEFolder)) + .on('end', () => { rimraf.sync(locADSFolder); fs.renameSync(locVSCODEFolder, locADSFolder); });