-
Notifications
You must be signed in to change notification settings - Fork 908
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
Path to combine cannot be empty error when running without login #945
Comments
One way (for me at least) to get this is to run choco 0.10 |
I too am seeing this behavior, and also think that no user logged in may be the culprit. In my case, I'm using an automation tool that supports issuing remote commands to an agent, and although I don't fully understand how it works, I believe it uses a system service to execute those commands on the agent and doesn't require a user to be logged in. I reliably see this error on a machine with no logged in user (shortly after a scheduled reboot) when issuing an install command. The package install script succeeds, but then I see the null ref error that follows it. Something like this:
If I log in to the machine in question, and then issue the same remote command, the install succeeds. |
This will be fixed for 0.10.1 thanks to @noresjo providing great log output that immediately identified the problem! |
When running from a scheduled task or from being run when no user is logged into the system, choco was failing on a path combine error when it should have just moved on. This is happening in cleaning up the nuget cache that was introduced in 0.9.10. The path combine was attempting to combine `$env:LocalAppData` with other components. LocalAppData is a user dependent environment variable and empty when no user is logged in. Instead look at the path to see if it is null and return early instead of attempting to clean up the cache.
* stable: Remove extra '=' (spec) fix tests (log) auto uninstaller enhancements messaging (GH-945) Fix - Fails Installs Running Without User
Following #853, we are still seeing IFIleSystem.combine_paths be passed a left side that is empty
choco/src/chocolatey/infrastructure/filesystem/DotNetFileSystem.cs
Line 69 in 401335b
It would be nice to determine what is being passed as empty to the method. Or at least get an idea of what method called this to make this happen.
The text was updated successfully, but these errors were encountered: