File tree Expand file tree Collapse file tree
packages/server/src/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -538,9 +538,11 @@ const removeLastTenDeployments = async (
538538 await removeRollbackById ( oldDeployment . rollbackId ) ;
539539 }
540540
541- command += `
542- rm -rf ${ logPath } ;
543- ` ;
541+ if ( logPath !== "." ) {
542+ command += `
543+ rm -rf ${ logPath } ;
544+ ` ;
545+ }
544546 await removeDeployment ( oldDeployment . deploymentId ) ;
545547 }
546548
@@ -551,7 +553,11 @@ const removeLastTenDeployments = async (
551553 await removeRollbackById ( oldDeployment . rollbackId ) ;
552554 }
553555 const logPath = path . join ( oldDeployment . logPath ) ;
554- if ( existsSync ( logPath ) && ! oldDeployment . errorMessage ) {
556+ if (
557+ existsSync ( logPath ) &&
558+ ! oldDeployment . errorMessage &&
559+ logPath !== "."
560+ ) {
555561 await fsPromises . unlink ( logPath ) ;
556562 }
557563 await removeDeployment ( oldDeployment . deploymentId ) ;
You can’t perform that action at this time.
0 commit comments