Skip to content

Commit

Permalink
Error when a different version is already installed
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs authored and mxcl committed Sep 6, 2024
1 parent 2759c54 commit b8e5fbd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modes/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ export default async function(pkgs: PackageRequirement[], unsafe: boolean) {
const found = value.match(/^\s*exec pkgx \+([^ ]+)/)?.[1]
const unsafe_found = value.match(/#MANAGED BY PKGX/);
if (found) {
if (found != pkgstr) {
throw new PkgxError(`different version already installed: ${blurple(program)} ${dim(`(${found})`)}`)
}
n++
console.warn(`pkgx: already installed: ${blurple(program)} ${dim(`(${found})`)}`)
continue program_loop
Expand Down

0 comments on commit b8e5fbd

Please sign in to comment.