Skip to content

Commit

Permalink
Repair: remove path from every repo entry, code: misc. changes
Browse files Browse the repository at this point in the history
  • Loading branch information
themitosan committed Dec 2, 2024
1 parent 12401c1 commit 7508965
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/repair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ export async function grpp_startRepairDatabase(){

});

// Check if current path exists are present on current database entry (Usually present on on GRPP version 1.0.0)
const repoPathWithCwd = `${process.cwd()}/repos/`;
if (currentRepo.indexOf(repoPathWithCwd) !== -1){

createLogEntry(`INFO - Updating repo entry from previous GRPP version: \"${currentRepo}\"`);
grpp_updateRepoData(currentRepo.replace(repoPathWithCwd, ''), currentRepoData);
grpp_removeRepo(currentRepo);

}

});

// Create log entry if any repo was fixed.
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ export function grpp_getRepoInfo(path:string){

// Get repo data
const
fullPath:string = Object.keys(grppSettings.repoEntries)[repoIndex!],
fullPath = Object.keys(grppSettings.repoEntries)[repoIndex!],
currentRepoData:grppRepoEntry = grppSettings.repoEntries[fullPath];
createLogEntry(`==> Repo info:\n\n${JSON.stringify(currentRepoData, null, 4)}\n`);
createLogEntry(`==> Repo info:\n\n${JSON.stringify(currentRepoData, void 0, 4)}\n`);

});

Expand Down

0 comments on commit 7508965

Please sign in to comment.