Skip to content
Snippets Groups Projects
Commit 7634efb8 authored by Djamel ALI's avatar Djamel ALI
Browse files

refactor: removed redundant code

parent 249570e8
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !37. Comments created here will be created in the context of that merge request.
......@@ -33,19 +33,19 @@ export default class Recorder {
}
async setupProject(gitMission: GitMission) {
if (this.userMission.isReviewing()) {
await copyProjectSources(
GITEA_PATH_IC,
MISSION_PATH_IC,
`user-git-${(await this.userMission.getGiteaUser()).username}`,
);
} else {
const argsArray: string[] = [`user-git-${(await this.userMission.getGiteaUser()).username}`];
if(!this.userMission.isReviewing()) {
argsArray.push('.git');
}
await copyProjectSources(
GITEA_PATH_IC,
MISSION_PATH_IC,
'.git',
`user-git-${(await this.userMission.getGiteaUser()).username}`,
...argsArray
);
if (!this.userMission.isReviewing()) {
renameTempToUserGitFiles(MISSION_PATH_IC, await gitMission.getAuthor());
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment