Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/cli/lib/archive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export async function archiveSiteContent(
const output = fs.createWriteStream( archivePath );
const archiveBuilder = archiver( 'zip', {
zlib: { level: ZIP_COMPRESSION_LEVEL },
// @ts-expect-error The `followSymlinks` option comes from a patch
followSymlinks: true,
} as archiver.ArchiverOptions );
} );

output.on( 'close', () => {
resolve( archiveBuilder );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class DefaultExporter extends EventEmitter implements Exporter {
this.emit( ExportEvents.BACKUP_CREATE_START );
const isZip = this.options.backupFile.endsWith( '.zip' );
const format = isZip ? 'zip' : 'tar';
return archiver( format, ARCHIVER_OPTIONS[ format ] as archiver.ArchiverOptions );
return archiver( format, ARCHIVER_OPTIONS[ format ] );
}

private setupArchiveListeners( output: fs.WriteStream ): Promise< void > {
Expand Down
14 changes: 14 additions & 0 deletions apps/cli/patches/archiver+7.0.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/node_modules/archiver/lib/core.js b/node_modules/archiver/lib/core.js
index 7c0a74d..2934fe5 100644
--- a/node_modules/archiver/lib/core.js
+++ b/node_modules/archiver/lib/core.js
@@ -631,7 +631,8 @@

var globOptions = {
stat: true,
- dot: true
+ dot: true,
+ follow: this.options.followSymlinks
};

function onGlobEnd() {
14 changes: 14 additions & 0 deletions apps/studio/patches/archiver+7.0.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/node_modules/archiver/lib/core.js b/node_modules/archiver/lib/core.js
index 7c0a74d..2934fe5 100644
--- a/node_modules/archiver/lib/core.js
+++ b/node_modules/archiver/lib/core.js
@@ -631,7 +631,8 @@

var globOptions = {
stat: true,
- dot: true
+ dot: true,
+ follow: this.options.followSymlinks
};

function onGlobEnd() {
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class DefaultExporter extends EventEmitter implements Exporter {
this.emit( ExportEvents.BACKUP_CREATE_START );
const isZip = this.options.backupFile.endsWith( '.zip' );
const format = isZip ? 'zip' : 'tar';
return archiver( format, ARCHIVER_OPTIONS[ format ] as archiver.ArchiverOptions );
return archiver( format, ARCHIVER_OPTIONS[ format ] );
}

private setupArchiveListeners( output: fs.WriteStream ): Promise< void > {
Expand Down
Loading