diff --git a/src/modules/git/Git.service.ts b/src/modules/git/Git.service.ts index 50628f7..3616279 100644 --- a/src/modules/git/Git.service.ts +++ b/src/modules/git/Git.service.ts @@ -26,29 +26,29 @@ export class GitServiceImpl implements GitService { async advertiseReceivePackRefs(cwd: string): Promise { const command = GitServiceImpl.isWindows() ? 'git' : 'git-receive-pack'; - const commonArgs = ['--stateless-rpc', '--advertise-refs', '.']; + const commonArgs = ['--stateless-rpc', '--advertise-refs', cwd]; const args = GitServiceImpl.isWindows() ? ['receive-pack', ...commonArgs] : commonArgs; - return spawn(command, args, { cwd }); + return spawn(command, args); } async advertiseUploadPackRefs(cwd: string): Promise { const command = GitServiceImpl.isWindows() ? 'git' : 'git-upload-pack'; - const commonArgs = ['--stateless-rpc', '--advertise-refs', '.']; + const commonArgs = ['--stateless-rpc', '--advertise-refs', cwd]; const args = GitServiceImpl.isWindows() ? ['upload-pack', ...commonArgs] : commonArgs; - return spawn(command, args, { cwd }); + return spawn(command, args); } async receivePack(cwd: string): Promise { const command = GitServiceImpl.isWindows() ? 'git' : 'git-receive-pack'; - const commonArgs = ['--stateless-rpc', '.']; + const commonArgs = ['--stateless-rpc', cwd]; const args = GitServiceImpl.isWindows() ? ['receive-pack', ...commonArgs] : commonArgs; - return spawn(command, args, { cwd }); + return spawn(command, args); } async uploadPack(cwd: string): Promise { const command = GitServiceImpl.isWindows() ? 'git' : 'git-upload-pack'; - const commonArgs = ['--stateless-rpc', '.']; + const commonArgs = ['--stateless-rpc', cwd]; const args = GitServiceImpl.isWindows() ? ['upload-pack', ...commonArgs] : commonArgs; - return spawn(command, args, { cwd }); + return spawn(command, args); } }