Skip to content

Commit

Permalink
🐛 Solved a repoData package manifest deletion conflict when is the sa…
Browse files Browse the repository at this point in the history
…me name but not the same platform and arch
  • Loading branch information
Powerm1nt committed Mar 5, 2023
1 parent fca21ac commit 742c7f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"commercial_name": "Pakagify",
"private": true,
"main": "src/main.js",
"version": "1.6.30",
"version": "1.7.32",
"scripts": {
"dev:pkdash": "vite --host --port 3000",
"start:electron": "electron .",
Expand Down
6 changes: 5 additions & 1 deletion src/Common/Pakagify.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,11 @@ export class Pakagify extends EventEmitter {
return this.getPakRepositoryData(user, repoName).then(async (repoData) => {
// Checks if the package already exists on the repo, if so, delete it (in case of update)
repoData.packages.forEach((value, index, array) => {
if (value.name === packageName) array.splice(index, 1)
if (
value.name === packageName &&
value.platform === packageModel.platform &&
value.arch === packageModel.arch
) array.splice(index, 1) // Remove the package from the array
})

// Make a copy and patch the repo data
Expand Down

0 comments on commit 742c7f8

Please sign in to comment.