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

Quoted InstallLocation in .registry file results in errors when attempting to automatically uninstall application #2336

Closed
corbob opened this issue Aug 31, 2021 · 0 comments · Fixed by #2337
Assignees
Milestone

Comments

@corbob
Copy link
Member

corbob commented Aug 31, 2021

What You Are Seeing?

Stemming from a Chocolatey.Extension issue, when the InstallLocation is quoted, the FileSystem object doesn't detect a directory as existing if the path is quoted. This means the test for directory existing is failing even when the directory does in fact exist.

What is Expected?

When checking for the existence of the InstallLocation, if there are quotes in the path they should be handled appropriately.

How Did You Get This To Happen? (Steps to Reproduce)

  1. Install the chocolatey package lastpass
  2. Try uninstalling it with choco uninstall lastpass --fromprograms

Output Log

https://gist.github.com/AdmiringWorm/8998e1703a6ba07b34e5dd0b6836e033

@corbob corbob self-assigned this Aug 31, 2021
corbob added a commit to corbob/choco that referenced this issue Aug 31, 2021
The InstallLocation can sometimes have quotes around the file path. When
this happens we don't detect the directory as existing even when it
does. As such, the uninstall doesn't actually happen. This change
removes the quotes before we ask the File System Provider if the
directory exists.
corbob added a commit to corbob/choco that referenced this issue Oct 1, 2021
The InstallLocation can sometimes have quotes around the file path. When
this happens we don't detect the directory as existing even when it
does. As such, the uninstall doesn't actually happen. This change
removes the quotes before we ask the File System Provider if the
directory exists.
gep13 pushed a commit to corbob/choco that referenced this issue Oct 2, 2021
The InstallLocation can sometimes have quotes around the file path. When
this happens we don't detect the directory as existing even when it
does. As such, the uninstall doesn't actually happen. This change
removes the quotes before we ask the File System Provider if the
directory exists.
@gep13 gep13 added this to the 0.12.0 milestone Oct 2, 2021
gep13 added a commit that referenced this issue Oct 2, 2021
(#2336) Remove quotes from InstallLocation
@gep13 gep13 added 4 - Done and removed 3 - Review labels Oct 2, 2021
@gep13 gep13 modified the milestones: 0.12.0, 0.11.3 Oct 21, 2021
gep13 pushed a commit that referenced this issue Oct 24, 2021
The InstallLocation can sometimes have quotes around the file path. When
this happens we don't detect the directory as existing even when it
does. As such, the uninstall doesn't actually happen. This change
removes the quotes before we ask the File System Provider if the
directory exists.
gep13 pushed a commit that referenced this issue Oct 26, 2021
The InstallLocation can sometimes have quotes around the file path. When
this happens we don't detect the directory as existing even when it
does. As such, the uninstall doesn't actually happen. This change
removes the quotes before we ask the File System Provider if the
directory exists.
@gep13 gep13 changed the title AutomaticUninstallerService doesn't handle quoted InstallLocation Quoted InstallLocation in .registry file results in errors when attempting to automatically uninstall application Oct 27, 2021
gep13 added a commit that referenced this issue Oct 27, 2021
* hotfix/0.11.3:
  (version) 0.11.3-beta
  (maint) Prevent inclusion of snk file
  (#2336) Remove quotes from InstallLocation
  (#877) Set SourceType for packages parsed from config
  (#2289) Add acknowledgements and license files
  (#2289) Update Rhino.Licensing dependency
  (maint) Replace unversioned Rhino.Licensing dll
  (#2398) Restore PowerShell v2 support
  (#2412) Switch to output warning on failure
gep13 added a commit that referenced this issue Oct 27, 2021
* master:
  (version) 0.11.3
  (version) 0.11.3-beta
  (maint) Prevent inclusion of snk file
  (#2336) Remove quotes from InstallLocation
  (#877) Set SourceType for packages parsed from config
  (#2289) Add acknowledgements and license files
  (#2289) Update Rhino.Licensing dependency
  (maint) Replace unversioned Rhino.Licensing dll
  (#2398) Restore PowerShell v2 support
  (#2412) Switch to output warning on failure

# Conflicts:
#	.uppercut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants