@@ -56,11 +56,11 @@ namespace Harness {
56
56
ts . Debug . assert ( ! ! config . cloneUrl , "Bad format from test.json: cloneUrl field must be present." ) ;
57
57
const submoduleDir = path . join ( cwd , directoryName ) ;
58
58
if ( ! fs . existsSync ( submoduleDir ) ) {
59
- exec ( "git" , [ "clone" , config . cloneUrl , directoryName ] , { cwd } ) ;
59
+ exec ( "git" , [ "--work-tree" , submoduleDir , " clone", config . cloneUrl , path . join ( submoduleDir , ".git" ) ] , { cwd } ) ;
60
60
}
61
- exec ( "git" , [ "reset" , "HEAD" , "--hard" ] , { cwd : submoduleDir } ) ;
62
- exec ( "git" , [ "clean" , "-f" ] , { cwd : submoduleDir } ) ;
63
- exec ( "git" , [ "pull" , "-f" ] , { cwd : submoduleDir } ) ;
61
+ exec ( "git" , [ "--git-dir" , path . join ( submoduleDir , ".git" ) , "--work-tree" , submoduleDir , " reset", "HEAD" , "--hard" ] , { cwd : submoduleDir } ) ;
62
+ exec ( "git" , [ "--git-dir" , path . join ( submoduleDir , ".git" ) , "--work-tree" , submoduleDir , " clean", "-f" ] , { cwd : submoduleDir } ) ;
63
+ exec ( "git" , [ "--git-dir" , path . join ( submoduleDir , ".git" ) , "--work-tree" , submoduleDir , " pull", "-f" ] , { cwd : submoduleDir } ) ;
64
64
65
65
types = config . types ;
66
66
@@ -337,4 +337,4 @@ ${stderr.replace(/\r\n/g, "\n")}`;
337
337
}
338
338
return result ;
339
339
}
340
- }
340
+ }
0 commit comments