Skip to content

Commit 47b876b

Browse files
authored
Update vsixeditor.ts
1 parent 8c7a158 commit 47b876b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

BuildTasks/PublishExtension/v4/vsixeditor.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ export class VSIXEditor {
188188
zip.arg("-tzip"); // zip format
189189
zip.arg("-mx9"); // max compression level
190190
zip.arg("-bd"); // disable progress indicator
191-
192191
}
193192
else
194193
{
@@ -207,20 +206,25 @@ export class VSIXEditor {
207206

208207
if (tl.getVariable("PREVIEW_FAST_UPDATE") === "true")
209208
{
209+
if (originalVsix !== targetVsix) {
210+
tl.debug("Original vsix not matching targetVsix. Copying.");
211+
tl.debug(originalVsix);
212+
tl.debug(targetVsix);
213+
tl.cp(originalVsix, targetVsix, "-f");
214+
}
210215
tl.cd(tmpPath);
211216
zip.arg(path.join(cwd, targetVsix)); // redirect output to file
212217
zip.arg(".");
213218
zip.arg("-r"); // recursive
214219
zip.arg("-9"); // max compression level
220+
zip.arg("-f"); // update changed files only
215221
}
216222
else{
217-
if (originalVsix !== targetVsix) { tl.cp(originalVsix, targetVsix, "-f"); }
218223
tl.cd(tmpPath);
219224
zip.arg(path.join(cwd, targetVsix)); // redirect output to file
220225
zip.arg(".");
221226
zip.arg("-r"); // recursive
222227
zip.arg("-9"); // max compression level
223-
zip.arg("-f"); // update changed files only
224228
}
225229
zip.execSync();
226230
}

0 commit comments

Comments
 (0)