Uploaded image for project: 'Puppet Development Kit (moved to puppet.atlassian.net)'
  1. Puppet Development Kit (moved to puppet.atlassian.net)
  2. PDK-1168

Unable to use PDK in PowerShell ISE console

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • PDK 1.11.0
    • None
    • Windows 10 - 1803

      PDK 1.6 and PDK 1.7

    • Hide

      PDK should be able to used within PowerShell ISE console.

      Show
      PDK should be able to used within PowerShell ISE console.
    • Needs Assessment
    • Enhancement
    • Hide
      Previously we added a known issue with regards to using PDK within an ISE console (https://puppet.com/docs/pdk/1.x/pdk_known_issues.html#using-pdk-with-powershell-ise-locks-the-console). This enhancement modified the PDK module wrapper to detect if it was within an ISE console and give the user helpful and actionable advice on how to work around this issue instead of just "crashing".

      The known issue added on 29 Jan 2019 can also be removed.
      Show
      Previously we added a known issue with regards to using PDK within an ISE console ( https://puppet.com/docs/pdk/1.x/pdk_known_issues.html#using-pdk-with-powershell-ise-locks-the-console ). This enhancement modified the PDK module wrapper to detect if it was within an ISE console and give the user helpful and actionable advice on how to work around this issue instead of just "crashing". The known issue added on 29 Jan 2019 can also be removed.
    • Needs Assessment

    Description

      When running the PDK new module command inside a PowerShell ISE window, it throws the following error and then locks the console (never returns)

      PS C:\source\tmp> pdk --version
      1.6.0
       
      PS C:\source\tmp> pdk new module
      ansicon.exe : pdk (INFO): Creating new module: 
      At C:\Program Files\WindowsPowerShell\Modules\PuppetDevelopmentKit\PuppetDevelopmentKit.psm1:14 char:5
      +     &$env:DEVKIT_BASEDIR\private\tools\bin\ansicon.exe $env:RUBY_DIR\ ...
      +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : NotSpecified: (pdk (INFO): Creating new module: :String) [], RemoteException
          + FullyQualifiedErrorId : NativeCommandError
      

      This was originally reported by Geoff Williams (geoff on Slack) who was also using PDK 1.7

      Attachments

        1. pdk_workaround.png
          pdk_workaround.png
          128 kB
        2. screenshot-1.png
          screenshot-1.png
          93 kB
        3. screenshot-2.png
          screenshot-2.png
          80 kB

        Activity

          People

            glenn.sarti Glenn Sarti
            glenn.sarti Glenn Sarti
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support