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

Handle PowerShell's InitializeDefaultDrives Error (that should just be a warning) #349

Closed
adamsea opened this issue Jul 6, 2015 · 10 comments

Comments

@adamsea
Copy link

adamsea commented Jul 6, 2015

Hello,

I began having an issue today with all install/upgrade operations in chocolatey. A sample of the error is attached:

choco

The related debug info is here:

2015-07-06 17:39:49,663 [DEBUG] - _ Chocolatey:ChocolateyInstallCommand - Normal Run Mode _
2015-07-06 17:39:49,663 [INFO ] - Installing the following packages:
2015-07-06 17:39:49,679 [INFO ] - ruby
2015-07-06 17:39:49,679 [INFO ] - By installing you accept licenses for the packages.
2015-07-06 17:39:51,042 [INFO ] - 
ruby v2.1.6
2015-07-06 17:39:51,230 [DEBUG] - Contents of 'C:\ProgramData\chocolatey\lib\ruby\tools\chocolateyInstall.ps1':
2015-07-06 17:39:51,246 [DEBUG] - try {

  $packageId = 'ruby'
  $binRoot = Get-BinRoot

  # $rubyFolder = '187'
  # $url = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.8.7-p374.exe?direct'
  # $checksum = '2e33a098f126275f7cb29ddcd0eb9845'

  # $rubyFolder = '193'
  # $url = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.9.3-p551.exe?direct'
  # $checksum = '25de5ff94b76d7d308cb75ba8179a6c0'

  # $rubyFolder = '200'
  # $url = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p645.exe?direct'
  # $checksum = 'cb25a38508e22a869b48df7974840eb78c77635c'
  # $url64 = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p645-x64.exe?direct'
  # $checksum64 = '8f8f39d69a222b5472254969755ff5d36dc42585'

  $rubyFolder = '21'
  $url = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6.exe?direct'
  $checksum = '28aeded17ca34f685fb3fb862fb35ad9414edd05'
  $url64 = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6-x64.exe?direct'
  $checksum64 = '07069b095c17f5b108e71951b4f16c410932a02d'

  $rubyPath = join-path $binRoot $('ruby' + "$rubyFolder")
  $silentArgs = "/verysilent /dir=`"$rubyPath`" /tasks=`"assocfiles,modpath`""

  # Install-ChocolateyPackage "$packageId" 'exe' "$silentArgs" "$url" -checksum $checksum
  Install-ChocolateyPackage "$packageId" 'exe' "$silentArgs" "$url" "$url64"
  #Checksum type sha1 has a bug fixed in 0.9.9.6 - https://github.com/chocolatey/choco/issues/253
  #-checksum $checksum -checksumType 'sha1' -checksum64 $checksum64 -checksumType64 'sha1'

  $rubyBin = join-path $rubyPath 'bin'
  Write-Host "Adding `'$rubyBin`' to the local path"
  $env:Path = "$($env:Path);$rubyBin"

  # # Install and configure pik
  # Write-Host "Now we are going to install pik and set up the folder - so Ruby is pointed to the correct version"
  # $nugetBin = join-path $env:ChocolateyInstall 'bin'
  # #$gem = 'gem.bat'
  # $pikInstall = 'pik_install.bat'
  # & gem install pik
  # & $pikInstall "$nugetBin"

  # & pik add $rubyBin
  # & pik use $rubyFolder

} catch {
  Write-ChocolateyFailure "$packageId" $($_.Exception.Message)
  throw
}

2015-07-06 17:39:51,261 [DEBUG] - Calling command ['"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\ruby\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters ''"']
2015-07-06 17:39:53,538 [ERROR] -  Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed.
2015-07-06 17:39:54,293 [INFO ] -  Get-BinRoot is going to be deprecated by v1. Many packages no longer require it since the folders no longer have versions on them.
2015-07-06 17:39:57,051 [INFO ] -  Installing ruby...
2015-07-06 17:40:11,994 [INFO ] -  ruby has been installed.
2015-07-06 17:40:11,994 [INFO ] -  Adding 'C:\tools\ruby21\bin' to the local path
2015-07-06 17:40:12,025 [DEBUG] - Command ['"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\ruby\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters ''"'] exited with '0'
2015-07-06 17:40:12,025 [DEBUG] - Calling command ['"shutdown" /a']
2015-07-06 17:40:12,056 [DEBUG] - Command ['"shutdown" /a'] exited with '1116'
2015-07-06 17:40:12,103 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\ruby'
2015-07-06 17:40:12,119 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\ruby\ruby.nupkg'
  with checksum '0E2737AC542C9491F4C94CFD13C98C9B'
2015-07-06 17:40:12,119 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\ruby\tools\chocolateyInstall.ps1'
  with checksum 'CF47C0F08CDBB3ADEFD9AE1D33BB38F8'
2015-07-06 17:40:12,150 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\ruby.2.1.6\.sxs".
2015-07-06 17:40:12,165 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\ruby.2.1.6\.pin".
2015-07-06 17:40:12,165 [DEBUG] - Attempting to delete directory "C:\ProgramData\chocolatey\lib-bad\ruby".
2015-07-06 17:40:12,181 [ERROR] - The install of ruby was NOT successful.
2015-07-06 17:40:12,181 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\ruby\tools\chocolateyInstall.ps1'.
 See log for details.
2015-07-06 17:40:12,197 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\ruby'
 to 'C:\ProgramData\chocolatey\lib-bad\ruby'
2015-07-06 17:40:14,231 [WARN ] - 
Chocolatey installed 0/1 package(s). 1 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2015-07-06 17:40:14,231 [ERROR] - Failures:
2015-07-06 17:40:14,247 [ERROR] -  - ruby
2015-07-06 17:40:14,247 [DEBUG] - Exiting with 1

Whatever program I install with choco install will still install, it just won't appear on subsequent choco list --local-only commands, and all related files are in lib-bad.

The "Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed." issue is from a disconnected network drive, but that shouldn't be mapping anything from the default install directory. Could that error still be the root of this issue, or is this a known issue?

Thanks,
-Eric

@ferventcoder
Copy link
Member

@adamsea I wonder if this is an issue with NuGet itself. I've actually never heard of that error before.
O_o

Perhaps we can try to figure out where it is occurring a little better?

Try using choco install pkgname -dv to trigger debug and verbose logging from NuGet/PowerShell.

@adamsea
Copy link
Author

adamsea commented Jul 6, 2015

@ferventcoder I re-ran the install with -dv and here's the output (note that I removed some system-specific info, if you need I can re-add it back in):

PS C:\WINDOWS\system32> choco install ruby -dv
Chocolatey v0.9.9.8
Chocolatey is running on Windows v 6.3.9600.0
Attempting to delete file "C:/ProgramData/chocolatey/choco.exe.old".
Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
Command line: "C:\ProgramData\chocolatey\choco.exe" install ruby -dv
Received arguments: install ruby -dv

-- SYSTEM SPECIFIC INFO DELETED --

Installing the following packages:
ruby
By installing you accept licenses for the packages.
[NuGet] Installing 'ruby 2.1.6'.
[NuGet] Added file 'chocolateyInstall.ps1' to folder 'ruby\tools'.
[NuGet] Added file 'ruby.nupkg' to folder 'ruby'.
[NuGet] Successfully installed 'ruby 2.1.6'.

ruby v2.1.6
Contents of 'C:\ProgramData\chocolatey\lib\ruby\tools\chocolateyInstall.ps1':
try {

  $packageId = 'ruby'
  $binRoot = Get-BinRoot

  # $rubyFolder = '187'
  # $url = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.8.7-p374.exe?direct'
  # $checksum = '2e33a098f126275f7cb29ddcd0eb9845'

  # $rubyFolder = '193'
  # $url = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.9.3-p551.exe?direct'
  # $checksum = '25de5ff94b76d7d308cb75ba8179a6c0'

  # $rubyFolder = '200'
  # $url = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p645.exe?direct'
  # $checksum = 'cb25a38508e22a869b48df7974840eb78c77635c'
  # $url64 = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p645-x64.exe?direct'
  # $checksum64 = '8f8f39d69a222b5472254969755ff5d36dc42585'

  $rubyFolder = '21'
  $url = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6.exe?direct'
  $checksum = '28aeded17ca34f685fb3fb862fb35ad9414edd05'
  $url64 = 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6-x64.exe?direct'
  $checksum64 = '07069b095c17f5b108e71951b4f16c410932a02d'

  $rubyPath = join-path $binRoot $('ruby' + "$rubyFolder")
  $silentArgs = "/verysilent /dir=`"$rubyPath`" /tasks=`"assocfiles,modpath`""

  # Install-ChocolateyPackage "$packageId" 'exe' "$silentArgs" "$url" -checksum $checksum
  Install-ChocolateyPackage "$packageId" 'exe' "$silentArgs" "$url" "$url64"
  #Checksum type sha1 has a bug fixed in 0.9.9.6 - https://github.com/chocolatey/choco/issues/253
  #-checksum $checksum -checksumType 'sha1' -checksum64 $checksum64 -checksumType64 'sha1'

  $rubyBin = join-path $rubyPath 'bin'
  Write-Host "Adding `'$rubyBin`' to the local path"
  $env:Path = "$($env:Path);$rubyBin"

  # # Install and configure pik
  # Write-Host "Now we are going to install pik and set up the folder - so Ruby is pointed to the correct version"
  # $nugetBin = join-path $env:ChocolateyInstall 'bin'
  # #$gem = 'gem.bat'
  # $pikInstall = 'pik_install.bat'
  # & gem install pik
  # & $pikInstall "$nugetBin"

  # & pik add $rubyBin
  # & pik use $rubyFolder

} catch {
  Write-ChocolateyFailure "$packageId" $($_.Exception.Message)
  throw
}

The package ruby wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider setting
 'allowGlobalConfirmation'. Run 'choco feature -h' for more details.
Do you want to run the script?
 1) yes
 2) no
 3) print
1
Calling command ['"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.
Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.
ps1' -packageScript 'C:\ProgramData\chocolatey\lib\ruby\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters ''"']
 Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed.
 DEBUG: Posh version is 4.0
 DEBUG: Loading community extensions
 VERBOSE: Exporting function 'Get-BinRoot'.
 VERBOSE: Exporting function 'Get-ChecksumValid'.
 VERBOSE: Exporting function 'Get-ChocolateyUnzip'.
 VERBOSE: Exporting function 'Get-ChocolateyWebFile'.
 VERBOSE: Exporting function 'Get-EnvironmentVariable'.
 VERBOSE: Exporting function 'Get-EnvironmentVariableNames'.
 VERBOSE: Exporting function 'Get-FtpFile'.
 VERBOSE: Exporting function 'Get-ProcessorBits'.
 VERBOSE: Exporting function 'Get-UACEnabled'.
 VERBOSE: Exporting function 'Get-VirusCheckValid'.
 VERBOSE: Exporting function 'Get-WebFile'.
 VERBOSE: Exporting function 'Get-WebHeaders'.
 VERBOSE: Exporting function 'Install-BinFile'.
 VERBOSE: Exporting function 'Install-ChocolateyDesktopLink'.
 VERBOSE: Exporting function 'Install-ChocolateyEnvironmentVariable'.
 VERBOSE: Exporting function 'Install-ChocolateyExplorerMenuItem'.
 VERBOSE: Exporting function 'Install-ChocolateyFileAssociation'.
 VERBOSE: Exporting function 'Install-ChocolateyInstallPackage'.
 VERBOSE: Exporting function 'Install-ChocolateyPackage'.
 VERBOSE: Exporting function 'Install-ChocolateyPath'.
 VERBOSE: Exporting function 'Install-ChocolateyPinnedTaskBarItem'.
 VERBOSE: Exporting function 'Install-ChocolateyPowershellCommand'.
 VERBOSE: Exporting function 'Install-ChocolateyShortcut'.
 VERBOSE: Exporting function 'Install-ChocolateyVsixPackage'.
 VERBOSE: Exporting function 'Install-Vsix'.
 VERBOSE: Exporting function 'Install-ChocolateyZipPackage'.
 VERBOSE: Exporting function 'Set-EnvironmentVariable'.
 VERBOSE: Exporting function 'Start-ChocolateyProcessAsAdmin'.
 VERBOSE: Exporting function 'Test-ProcessAdminRights'.
 VERBOSE: Exporting function 'Uninstall-BinFile'.
 VERBOSE: Exporting function 'Uninstall-ChocolateyPackage'.
 VERBOSE: Exporting function 'UnInstall-ChocolateyZipPackage'.
 VERBOSE: Exporting function 'Update-SessionEnvironment'.
 VERBOSE: Exporting function 'Write-ChocolateyFailure'.
 VERBOSE: Exporting function 'Write-ChocolateySuccess'.
 VERBOSE: Exporting function 'Write-FileUpdateLog'.
 VERBOSE: Exporting alias 'Generate-BinFile'.
 VERBOSE: Exporting alias 'Add-BinFile'.
 VERBOSE: Exporting alias 'Remove-BinFile'.
 DEBUG: Running 'Get-BinRoot'
 Get-BinRoot is going to be deprecated by v1. Many packages no longer require it since the folders no longer have versions on them.
 DEBUG: Running 'Install-ChocolateyPackage' for ruby with url:'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6.exe?direct', args: '/verysilent /dir="C:\tools\ruby21"
 /tasks="assocfiles,modpath"', fileType: 'exe', url64bit: 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6-x64.exe?direct', checksum: '', checksumType: '', checksum64: '',
 checksumType64: '', validExitCodes: '0'
 DEBUG: Running 'Get-ChocolateyWebFile' for ruby with url:'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6.exe?direct',
 fileFullPath:'C:\Users\eadams\AppData\Local\Temp\chocolatey\ruby\rubyInstall.exe', url64bit:'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6-x64.exe?direct', checksum: '',
 checksumType: '', checksum64: '', checksumType64: ''
 DEBUG: Running 'Get-ProcessorBits'
 DEBUG: CPU is 64 bit
 DEBUG: Setting url to 'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6-x64.exe?direct' and bitPackage to 64
 DEBUG: Running 'Get-WebHeaders' with url:'http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.1.6-x64.exe?direct', userAgent: 'chocolatey command line'
 DEBUG: Setting the UserAgent to 'chocolatey command line'
 DEBUG: Request Headers:
 DEBUG:   'Accept':'*/*'
 DEBUG:   'User-Agent':'chocolatey command line'
 DEBUG: Response Headers:
 DEBUG:   'Content-Disposition':'attachment;filename="rubyinstaller-2.1.6-x64.exe"'
 DEBUG:   'Age':'30098'
 DEBUG:   'X-Cache':'Hit from cloudfront,MISS from localhost'
 DEBUG:   'X-Amz-Cf-Id':'3OMKJHbXKFDqf6CZWUi-leO6ECM9b9Z6UUvpUgr3CebL_k0lSuzn5w=='
 DEBUG:   'X-Cache-Lookup':'MISS from localhost:3128'
 DEBUG:   'Connection':'keep-alive'
 DEBUG:   'Accept-Ranges':'bytes'
 DEBUG:   'Content-Length':'18209758'
 DEBUG:   'Content-Type':'application/unknown'
 DEBUG:   'Date':'Mon, 06 Jul 2015 13:35:42 GMT'
 DEBUG:   'ETag':'"50a2c0097532a4086fa58b6507f6181c"'
 DEBUG:   'Last-Modified':'Thu, 16 Apr 2015 19:00:44 GMT'
 DEBUG:   'Server':'AmazonS3'
 DEBUG:   'Via':'1.1 ae2ec41419bb9b44ca9b925fad50a43f.cloudfront.net (CloudFront), 1.1 localhost (squid)'
 DEBUG: ruby's requested file has already been downloaded. Using cached copy at
   'C:\Users\eadams\AppData\Local\Temp\chocolatey\ruby\rubyInstall.exe'.
 DEBUG: Checking that 'C:\Users\eadams\AppData\Local\Temp\chocolatey\ruby\rubyInstall.exe' is the size we expect it to be.
 DEBUG: Verifying package provided checksum of '' for 'C:\Users\eadams\AppData\Local\Temp\chocolatey\ruby\rubyInstall.exe'.
 DEBUG: Running 'Get-ChecksumValid' with file:'C:\Users\eadams\AppData\Local\Temp\chocolatey\ruby\rubyInstall.exe', checksum: '', checksumType: ''
 DEBUG: Running 'Install-ChocolateyInstallPackage' for ruby with file:'C:\Users\eadams\AppData\Local\Temp\chocolatey\ruby\rubyInstall.exe', args: '/verysilent /dir="C:\tools\ruby21"
 /tasks="assocfiles,modpath"', fileType: 'exe', validExitCodes: '0'
 Installing ruby...
 DEBUG: Running 'Start-ChocolateyProcessAsAdmin' with exeToRun:'C:\Users\eadams\AppData\Local\Temp\chocolatey\ruby\rubyInstall.exe', statements: '/verysilent /dir="C:\tools\ruby21"
 /tasks="assocfiles,modpath" '
 DEBUG: Elevating Permissions and running C:\Users\eadams\AppData\Local\Temp\chocolatey\ruby\rubyInstall.exe /verysilent /dir="C:\tools\ruby21" /tasks="assocfiles,modpath" . This may take a while,
 depending on the statements.
 DEBUG: Finishing 'Start-ChocolateyProcessAsAdmin'
 ruby has been installed.
 Adding 'C:\tools\ruby21\bin' to the local path
Command ['"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -NoLogo -ExecutionPolicy Bypass -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threadin
g.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -pa
ckageScript 'C:\ProgramData\chocolatey\lib\ruby\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters ''"'] exited with '0'
Calling command ['"shutdown" /a']
Command ['"shutdown" /a'] exited with '1116'
Capturing package files in 'C:\ProgramData\chocolatey\lib\ruby'
 Found 'C:\ProgramData\chocolatey\lib\ruby\ruby.nupkg'
  with checksum '0E2737AC542C9491F4C94CFD13C98C9B'
 Found 'C:\ProgramData\chocolatey\lib\ruby\tools\chocolateyInstall.ps1'
  with checksum 'CF47C0F08CDBB3ADEFD9AE1D33BB38F8'
Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\ruby.2.1.6\.sxs".
Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\ruby.2.1.6\.pin".
Attempting to delete directory "C:\ProgramData\chocolatey\lib-bad\ruby".
The install of ruby was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\ruby\tools\chocolateyInstall.ps1'.
 See log for details.
Moving 'C:\ProgramData\chocolatey\lib\ruby'
 to 'C:\ProgramData\chocolatey\lib-bad\ruby'

Chocolatey installed 0/1 package(s). 1 package(s) failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures:
 - ruby
Exiting with 1
PS C:\WINDOWS\system32>

Note that the "Attempting to perform the InitializeDefaultDrives operation on the 'FileSystem' provider failed." error came directly after the powershell command.

Thanks for taking a look!
-Eric

@ferventcoder
Copy link
Member

The system specific information (the configuration) is not known to contain anything sensitive, and is sometimes very helpful in determining what may be wrong in your environment. However we want folks to look over that information and remove anything that may be sensitive if it appears.

In this case, I'm not sure we need it. Looks like a powershell issue. Something you can resolve on your own:

It looks like we need to handle this with chocolatey and not treat it as an error.

@ferventcoder
Copy link
Member

Forgot to add all of the references. You will see those on the repo - I will update that.

@ferventcoder ferventcoder changed the title Error while running chocolateyInstall.ps1 Handle PowerShell's InitializeDefaultDrives Error (that should just be a warning) Jul 7, 2015
@ferventcoder ferventcoder added this to the 0.9.9.9 milestone Jul 7, 2015
@adamsea
Copy link
Author

adamsea commented Jul 7, 2015

Ok thanks @ferventcoder in the meantime I'll try fixing it on my side and verify that fixes the install error!

@ferventcoder
Copy link
Member

@adamsea did it work?

@ferventcoder
Copy link
Member

@adamsea ping

ferventcoder added a commit that referenced this issue Sep 18, 2015
If you have a network drive that is not available or has been
disconnected, PowerShell will happily throw an error about it with the
following message: "Attempting to perform the InitializeDefaultDrives
operation on the 'FileSystem' provider failed." Since it is not really
an error, we should log the message accordingly and move on, but not
fail the choco install due to some crazy warning that for some reason
is an error message.
@ferventcoder ferventcoder self-assigned this Sep 18, 2015
ferventcoder added a commit that referenced this issue Sep 18, 2015
* stable:
  (GH-387) Validate before remove rollback folder
  (GH-349) Ignore PowerShell InitializeDefaultDrives
@adamsea
Copy link
Author

adamsea commented Sep 22, 2015

Hi @ferventcoder - apologies for the delayed response - yes fixing the disconnected network drive resolved the issue. Thank you for looking into this!

@ferventcoder
Copy link
Member

👍

@ferventcoder
Copy link
Member

See #445 - the code for this is being reverted with #8 as now by default choco doesn't fail based on stderr being written to and we want both paths to be similar (choco's built-in powershell and system powershell).

ferventcoder added a commit to ferventcoder/choco that referenced this issue Jan 1, 2016
When running PowerShell operations, use a built-in PowerShell host by
default, allowing fallback to the older method of running Posh
by calling an external process. By building against the oldest version
of System.Management.Automation that aligns with the oldest Windows
Operating Systems supported, we can guarantee this will work on every
version of Windows where Chocolatey is supported.

In case we do run into issues, attempt to resolve the PowerShell
assemblies starting from the newest version and falling down to the
older versions until one is resolved or no version is resolved. There
is a known assembly that will go through this process every time -
System.Management.Automation.resources, en-US. To see those assemblies
go through, one must ask for both debug and verbose output.

This reverts the changes for chocolateyGH-249 in 9936876 and the changes
from chocolateyGH-349 in 344268b so that both paths (system powershell
and choco's built-in PowerShell) run with similar output and because by
default in d523e7b (chocolateyGH-445) choco no longer fails on the
presence of stderr output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants