@@ -95,9 +95,7 @@ async function startAgent() {
9595
9696 await spawnFluentCI (
9797 logger ,
98- `${ dir ( "home" ) } /.fluentci/builds/${ id } /${ repoUrl
99- . split ( "/" )
100- . pop ( ) } /${ workDir || "." } `,
98+ `${ dir ( "home" ) } /.fluentci/builds/${ id } /${ workDir || "." } ` ,
10199 pipeline ,
102100 jobs ,
103101 runId ,
@@ -195,21 +193,18 @@ async function extractZipBlob(blob: Blob, project_id: string, sha256: string) {
195193}
196194
197195async function gitClone ( url : string , id : string , branch ?: string ) {
198- await Deno . mkdir ( `${ dir ( "home" ) } /.fluentci/builds/${ id } ` , {
199- recursive : true ,
200- } ) ;
201196 await setupPkgx ( ) ;
202197 const git = new Deno . Command ( "pkgx" , {
203- args : [ "git" , "clone" , url ] ,
204- cwd : `${ dir ( "home" ) } /.fluentci/builds/ ${ id } ` ,
198+ args : [ "git" , "clone" , url , id ] ,
199+ cwd : `${ dir ( "home" ) } /.fluentci/builds` ,
205200 stdout : "inherit" ,
206201 stderr : "inherit" ,
207202 } ) ;
208203
209204 if ( branch ) {
210205 await new Deno . Command ( "pkgx" , {
211206 args : [ "git" , "checkout" , branch ] ,
212- cwd : `${ dir ( "home" ) } /.fluentci/builds/${ id } / ${ url . split ( "/" ) . pop ( ) } ` ,
207+ cwd : `${ dir ( "home" ) } /.fluentci/builds/${ id } ` ,
213208 stdout : "inherit" ,
214209 stderr : "inherit" ,
215210 } ) . spawn ( ) . status ;
0 commit comments