Uploaded image for project: 'Community Package Repository'
  1. Community Package Repository
  2. CPR-264

Nuget chocolateyInstall.ps1 barfs when trying to copy over the contents of empty directories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2017/08/02
    • Component/s: None
    • Labels:
      None
    • Template:

      Error rendering 'issue-templates-customfield'. Please contact your Jira administrators.

    • Story Points:
      2
    • Sprint:
      RE 2016-01-13

      Description

      When installing a nuget package with empty directories, the chocolateyInstall.ps1 script tries to copy over the contents of that directory. We need to check if the directory exists and if contents exist in our source location (the chocolatey directory) before trying to copy over to our final destination.

      i.e.,

      puppet-agent-x64 v1.3.2.173-g5795760
           Directory: C:\Program Files
       Mode                LastWriteTime     Length Name
       ----                -------------     ------ ----
       d----        12/22/2015     11:12            Puppet Labs
       Copy-Item : Cannot find path 'C:\ProgramData\chocolatey\lib\puppet-agent-x64\to
       ols\cygdrive\c\Program Files\Puppet Labs' because it does not exist.
       At C:\ProgramData\chocolatey\lib\puppet-agent-x64\tools\chocolateyInstall.ps1:9
        char:1
       + Copy-Item -path "$origin\*" -destination "C:\Program Files\Puppet Labs\" -Rec
       urs ...
       + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       ~~~
           + CategoryInfo          : ObjectNotFound: (C:\ProgramData\...les\Puppet La
          bs:String) [Copy-Item], ItemNotFoundException
           + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyI
          temCommand
           Directory: C:\Progra~1\Puppet~1
       Mode                LastWriteTime     Length Name
       ----                -------------     ------ ----
       d----        12/22/2015     11:12            Puppet
           Directory: C:\ProgramData
       Mode                LastWriteTime     Length Name
       ----                -------------     ------ ----
       d----        12/22/2015     11:12            PuppetLabs
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              melissa Melissa Stone
              Reporter:
              melissa Melissa Stone
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support