psake / PowerShellBuild

Common build tasks for psake and Invoke-Build that build and test PowerShell modules
MIT License
133 stars 24 forks source link

INIT task throws an exception in Windows PowerShell #65

Open TrisBits opened 1 year ago

TrisBits commented 1 year ago

The INIT task throws an exception when called from a Windows Powershell session. This same issue was previously reported in issue #53 and fixed with merge #60. However, the fix seems to have since been reverted causing the issue to return.

Expected Behavior

PowerShellBuild tasks should also be compatible with PowerShell 5.1

Current Behavior

Receive error: Exception: Method invocation failed because [System.IO.Path] does not contain a method named 'IsPathFullyQualified'.

Possible Solution

Re-implement the fix from merge #60

Steps to Reproduce (for bugs)

  1. Create a new module with Stucco
  2. Execute .\build.ps1 from a Windows PowerShell terminal

Context

I was attempting to build a PowerShell 5.1 module. Once I modified the Initialize-PSBuild function based on the change in merge #60 it worked flawlessly.

Your Environment

*Module version used: 0.6.1 Operating System and PowerShell version: Windows 10 with PowerShell 5.1 Running .\build.ps1 from the Stucco template

meterien commented 1 year ago

I can reproduce this on my end too, but work in Powershell 7.3.2