feat: when reading from AzureDevOps strip the root directory as that is how the ZipArchive is returned
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -133,6 +133,7 @@ export class AzureUrlReader implements UrlReader {
|
||||
stream: archiveAzureResponse.body as unknown as Readable,
|
||||
etag: commitSha,
|
||||
filter: options?.filter,
|
||||
stripFirstDirectory: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ export class DefaultReadTreeResponseFactory implements ReadTreeResponseFactory {
|
||||
this.workDir,
|
||||
options.etag,
|
||||
options.filter,
|
||||
options.stripFirstDirectory,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,6 +182,9 @@ export type ReadTreeResponseFactoryOptions = {
|
||||
etag: string;
|
||||
// Filter passed on from the ReadTreeOptions
|
||||
filter?: (path: string, info?: { size: number }) => boolean;
|
||||
|
||||
// Strip the first directory in the readTree response
|
||||
stripFirstDirectory?: boolean;
|
||||
};
|
||||
|
||||
/** @public */
|
||||
|
||||
Reference in New Issue
Block a user