We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd07ac8 commit 559956eCopy full SHA for 559956e
src/gitpuller.ts
@@ -23,7 +23,14 @@ export abstract class GitPuller {
23
* @returns the path of the created directory.
24
*/
25
async clone(url: string, branch: string, basePath: string): Promise<string> {
26
- await this.createTree([basePath]);
+ const basePathComponents = basePath.split('/');
27
+ const basePathPrefixes = [];
28
+ for (let i = 0; i < basePathComponents.length; i++) {
29
+ basePathPrefixes.push(basePathComponents.slice(0, i+1).join('/'));
30
+ }
31
+
32
+ // For a basePath 'a/b/c', create ['a', 'a/b', 'a/b/c']
33
+ await this.createTree(basePathPrefixes);
34
35
const fileList = await this.getFileList(url, branch);
36
0 commit comments