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:
blam
2021-09-07 11:55:14 +02:00
parent 96f239228a
commit 0cb28c22e3
5 changed files with 79 additions and 0 deletions
@@ -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 */