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

Deleting NuGet temp folders fails when running on Linux #2383

Closed
TheCakeIsNaOH opened this issue Sep 28, 2021 · 0 comments · Fixed by #2387
Closed

Deleting NuGet temp folders fails when running on Linux #2383

TheCakeIsNaOH opened this issue Sep 28, 2021 · 0 comments · Fixed by #2387
Assignees
Milestone

Comments

@TheCakeIsNaOH
Copy link
Member

What You Are Seeing?

In the log (or when running with --debug) when running on Mono on Linux, it shows that choco is failing to remove the NuGet temp directories.

Not able to cleanup NuGet temp folders. Failure was Path to combine cannot be empty. Tried to combine null with ''. Method called from 'delete_directory'

What is Expected?

That the NuGet temp directories can be remove without issue.

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

  1. Build and install choco on Linux
  2. Run choco --verbose --debug

Output Log

Full Log Output

choco --debug --verbose
Chocolatey v0.11.2-29-g8fdd1486
Chocolatey is running on Linux v 5.10.0.0
Attempting to delete file "/opt/chocolatey/chocolatey.dll.old".
Attempting to delete file "/opt/chocolatey/choco.exe.old".
Command line: /opt/chocolatey/choco.exe --debug --verbose --allow-unofficial
Received arguments: --debug --verbose --allow-unofficial
RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
Sending message 'PreRunMessage' out if there are subscribers...
[Pending] Removing all pending packages that should not be considered installed...
Sending message 'PostRunMessage' out if there are subscribers...
Not able to cleanup NuGet temp folders. Failure was Path to combine cannot be empty. Tried to combine null with ''. Method called from 'delete_directory'
Exiting with 1

I have a fix for this issue on the way.

TheCakeIsNaOH added a commit to TheCakeIsNaOH/choco that referenced this issue Sep 28, 2021
…orms

Linux and MacOS do not normally have a "SystemDrive" environment
variable since they have everything under a single root of "/".
This switches to use "/" instead of "SystemDrive" on non-Windows
platforms. These two instances are the only ones I see in the C#
codebase. There are a couple of uses of "SystemDrive" in the PowerShell
helpers, but those are not run on non-Windows platforms.
@gep13 gep13 added this to the 0.12.0 milestone Oct 2, 2021
gep13 pushed a commit to TheCakeIsNaOH/choco that referenced this issue Oct 2, 2021
…orms

Linux and MacOS do not normally have a "SystemDrive" environment
variable since they have everything under a single root of "/".
This switches to use "/" instead of "SystemDrive" on non-Windows
platforms. These two instances are the only ones I see in the C#
codebase. There are a couple of uses of "SystemDrive" in the PowerShell
helpers, but those are not run on non-Windows platforms.
gep13 added a commit that referenced this issue Oct 2, 2021
(#2383) Use "/" instead of SystemDrive on non-Windows platforms
@gep13 gep13 added 4 - Done and removed 3 - Review labels Oct 2, 2021
tapika pushed a commit to tapika/swupd that referenced this issue Jan 30, 2022
…orms

Linux and MacOS do not normally have a "SystemDrive" environment
variable since they have everything under a single root of "/".
This switches to use "/" instead of "SystemDrive" on non-Windows
platforms. These two instances are the only ones I see in the C#
codebase. There are a couple of uses of "SystemDrive" in the PowerShell
helpers, but those are not run on non-Windows platforms.
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