Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AzureAuth Windows uninstall script #340

Merged
merged 15 commits into from
Oct 12, 2023

Conversation

Emilio0404
Copy link
Contributor

@Emilio0404 Emilio0404 commented Sep 28, 2023

Added a script to uninstall AzureAuth easily. The script handles the removal of the default AzureAuth installation folder, and updates the PATH to not contain any references to AzureAuth.

Right now, it was tested manually, but integration tests are coming soon.

From issue: #121

@Emilio0404 Emilio0404 added the enhancement New feature or request label Sep 28, 2023
@Emilio0404 Emilio0404 requested a review from a team as a code owner September 28, 2023 20:32
@shalinikhare27
Copy link
Contributor

@Emilio0404 - We can just edit the title as AzureAuth uninstall script :)

@Emilio0404 Emilio0404 changed the title User/t jalvearcan/uninstall scripts AzureAuth Windows uninstall script Sep 28, 2023
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
Copy link
Member

@reillysiemens reillysiemens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Emilio0404, this is a great first AzureAuth PR. I have a couple of thoughts/questions for you, but overall I think you're on the right track. I think the biggest thing to sort out will be whether we can reasonably support uninstalling from custom locations.

install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
Copy link
Member

@reillysiemens reillysiemens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Emilio0404: I appreciate your willingness to keep iterating on this. It seems like you're still working through some of this, so feel free to consider a draft PR if you're not ready for more review.

I've left some more granular, but minor feedback after your last changes. At a high level I want to suggest that maybe you could just delete the entire default installation location instead of individually removing subdirectories thereof.

Basically, this:

  1. Discover all paths where AzureAuth might be.
  2. Just delete the entire %LOCALAPPDATA%\Programs\AzureAuth directory.
  3. Clean up paths you deleted from %PATH% (these will be subdirectories of the above).
  4. Output that you've uninstalled AzureAuth.
  5. As a courtesy, output non-overlapping paths from step 1 (things you can't actually safely delete).

I think this might simplify some of your current logic.

@mvanchaa, @shalinikhare27, @Haard30: Would love your feedback on the above steps. ☝️

install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
install/uninstall.ps1 Outdated Show resolved Hide resolved
@Emilio0404 Emilio0404 marked this pull request as draft October 4, 2023 20:30
@Emilio0404 Emilio0404 marked this pull request as ready for review October 5, 2023 23:09
mvanchaa
mvanchaa previously approved these changes Oct 5, 2023
shalinikhare27
shalinikhare27 previously approved these changes Oct 5, 2023
reillysiemens
reillysiemens previously approved these changes Oct 5, 2023
Haard30
Haard30 previously approved these changes Oct 6, 2023
@Emilio0404 Emilio0404 merged commit e3a00aa into main Oct 12, 2023
9 checks passed
@Emilio0404 Emilio0404 deleted the user/t-jalvearcan/uninstall-scripts branch October 12, 2023 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants