Skip to content

Commit

Permalink
Untitled commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore03109 committed Dec 4, 2023
1 parent 480621f commit 0c79c00
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/services/db/GitFileSystemService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,29 @@ export default class GitFileSystemService {
)
.orElse(() =>
// Retry push once
ResultAsync.fromPromise(
isForce
? this.git
.cwd({ path: `${efsVolPath}/${repoName}`, root: false })
.push([...gitOptions, "--force"])
: this.git
.cwd({ path: `${efsVolPath}/${repoName}`, root: false })
.push(gitOptions),
(error) => {
logger.error(`Error when pushing ${repoName}: ${error}`)

if (error instanceof GitError) {
return new GitFileSystemError(
"Unable to push latest changes of repo"
)
}

return new GitFileSystemError("An unknown error occurred")
}
)
)
.orElse(() =>
// Retry push twice
ResultAsync.fromPromise(
isForce
? this.git
Expand Down

0 comments on commit 0c79c00

Please sign in to comment.