added on end function to end of pipe (#16144)

This commit is contained in:
Alex Ma
2021-07-14 14:36:52 -07:00
committed by GitHub
parent d5f52ba53d
commit f7bf914bcb
2 changed files with 8 additions and 6 deletions

View File

@@ -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);
});

View File

@@ -387,9 +387,10 @@ export function renameVscodeLangpacks(): Promise<void> {
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);
});