Skip to content

Updating when an asset isn't available causes an uninstall #149

@olearycrew

Description

@olearycrew

pdtm version:

v0.0.7

Current Behavior:

Currently there is an issue with cdncheck's latest release not having any assets available (see projectdiscovery/cdncheck#103).

In this state, PDTM knows that there is an update available for cdncheck, but when it goes to do an update, it deletes cdncheck and then cannot get the latest asset and thus leaves you without the tool after the "update"

CleanShot 2023-05-25 at 15 14 39@2x CleanShot 2023-05-25 at 15 16 30@2x CleanShot 2023-05-25 at 15 16 39

Expected Behavior:

When the update isn't actually available, leave the system in the same state instead of removing the tool. This could mean that a GitHub downtime or similar odd problem could screw up a lot of folks tools.

Steps To Reproduce:

  • Install cdncheck into the pdtm bin
    • To do this after mine was broken I did this
    • wget https://github.com/projectdiscovery/cdncheck/releases/download/v1.0.3/cdncheck_1.0.3_linux_amd64.zip
    • unzip cdncheck_1.0.3_linux_amd64.zip
    • mv ./cdncheck ~/.pdtm/go/bin/
  • which cdncheck returns /home/kali/.pdtm/go/bin/cdncheck
  • Observe the need for an update with pdtm
    • 21. cdncheck (outdated) (1.0.3) ➡ (1.0.5)
  • Run pdtm -update-all
  • Observe the error above
  • which cdncheck returns cdncheck not found
  • cdncheck is now no longer in /home/kali/.pdtm
CleanShot 2023-05-25 at 15 21 13@2x

Anything else:

Metadata

Metadata

Assignees

Labels

Status: CompletedNothing further to be done with this issue. Awaiting to be closed.Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions