PSResourceGet
PSResourceGet copied to clipboard
In-repo test instructions appear to be inaccurate/out-of-date
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest released version
- [X] Search the existing issues.
Steps to reproduce
- Install PSPackageProject from PowerShell Gallery
- Try running
Invoke-PSPackageProjectTest
as described in the README
Expected behavior
Tests are executed
Actual behavior
PS X:\source\repos\PSResourceGet> Invoke-PSPackageProjectTest -Type Functional
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Split-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
Join-Path: Cannot bind argument to parameter 'Path' because it is an empty string.
(repeats indefinitely)
Error details
Exception :
Type : System.Management.Automation.ParameterBindingValidationException
Message : Cannot bind argument to parameter 'Path' because it is an empty string.
ParameterName : Path
ParameterType : string[]
TypeSpecified : string
ErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed
Line : 41
Offset : 37
CommandInvocation :
MyCommand : Split-Path
ScriptLineNumber : 41
OffsetInLine : 26
HistoryId : 11
ScriptName : C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1
Line : $startPath = Split-Path $startPath
Statement : Split-Path $startPath
PositionMessage : At C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1:41 char:26
+ $startPath = Split-Path $startPath
+ ~~~~~~~~~~~~~~~~~~~~~
PSScriptRoot : C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18
PSCommandPath : C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1
InvocationName : Split-Path
PipelineLength : 1
PipelinePosition : 1
CommandOrigin : Internal
ErrorRecord :
Exception :
Type : System.Management.Automation.ParentContainsErrorRecordException
Message : Cannot bind argument to parameter 'Path' because it is an empty string.
HResult : -2146233087
CategoryInfo : InvalidData: (:) [Split-Path], ParentContainsErrorRecordException
FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.SplitPathCommand
InvocationInfo :
MyCommand : Split-Path
ScriptLineNumber : 41
OffsetInLine : 37
HistoryId : 11
ScriptName : C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1
Line : $startPath = Split-Path $startPath
Statement : $startPath
PositionMessage : At C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1:41 char:37
+ $startPath = Split-Path $startPath
+ ~~~~~~~~~~
PSScriptRoot : C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18
PSCommandPath : C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1
CommandOrigin : Internal
ScriptStackTrace : at SearchConfigFile, C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1: line 41
at Get-PSPackageProjectConfiguration, C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1: line 970
at Invoke-FunctionalValidation, C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1: line 196
at Invoke-PSPackageProjectTest<End>, C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1: line 347
at <ScriptBlock>, <No file>: line 1
TargetSite :
Name : BindPositionalParametersInSet
DeclaringType : System.Management.Automation.ParameterBinderController, System.Management.Automation, Version=7.4.0.500, Culture=neutral, PublicKeyToken=31bf3856ad364e35
MemberType : Method
Module : System.Management.Automation.dll
Source : System.Management.Automation
HResult : -2146233087
StackTrace :
at System.Management.Automation.ParameterBinderController.BindPositionalParametersInSet(UInt32 validParameterSets, Dictionary`2 nextPositionalParameters, CommandParameterInternal argument, ParameterBindingFlags flags, ParameterBindingException& bindingException)
at System.Management.Automation.ParameterBinderController.BindPositionalParameters(Collection`1 unboundArguments, UInt32 validParameterSets, UInt32 defaultParameterSet, ParameterBindingException& outgoingBindingException)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParametersNoValidation(Collection`1 arguments)
at System.Management.Automation.CmdletParameterBinderController.BindCommandLineParameters(Collection`1 arguments)
at System.Management.Automation.CommandProcessor.BindCommandLineParameters()
at System.Management.Automation.CommandProcessor.Prepare(IDictionary psDefaultParameterValues)
at System.Management.Automation.CommandProcessorBase.DoPrepare(IDictionary psDefaultParameterValues)
at System.Management.Automation.Internal.PipelineProcessor.Start(Boolean incomingStream)
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
--- End of stack trace from previous location ---
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input)
at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
at lambda_method1392(Closure, Object[], StrongBox`1[], InterpretedFrame)
CategoryInfo : InvalidData: (:) [Split-Path], ParameterBindingValidationException
FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Microsoft.PowerShell.Commands.SplitPathCommand
InvocationInfo :
MyCommand : Split-Path
ScriptLineNumber : 41
OffsetInLine : 37
HistoryId : 11
ScriptName : C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1
Line : $startPath = Split-Path $startPath
Statement : $startPath
PositionMessage : At C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1:41 char:37
+ $startPath = Split-Path $startPath
+ ~~~~~~~~~~
PSScriptRoot : C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18
PSCommandPath : C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1
CommandOrigin : Internal
ScriptStackTrace : at SearchConfigFile, C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1: line 41
at Get-PSPackageProjectConfiguration, C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1: line 970
at Invoke-FunctionalValidation, C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1: line 196
at Invoke-PSPackageProjectTest<End>, C:\Program Files\WindowsPowerShell\Modules\PSPackageProject\0.1.18\PSPackageProject.psm1: line 347
at <ScriptBlock>, <No file>: line 1
Environment data
Name Value
---- -----
PSVersion 7.4.0
PSEdition Core
GitCommitId 7.4.0
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Copying some more details from https://github.com/PowerShell/PSResourceGet/issues/1486#issuecomment-1874786366:
- The version of PSPackageProject on PSGallery doesn't seem to work with this project:
- The expected config file names differ (package.config.json vs pspackageproject.json)
- Running Invoke-PSPackageProjectTest from the latest version on PSGallery doesn't fail out of its do-while{} loop, so it spams errors from Split-Path/Join-Path instead.
- CI tests don't appear to be calling
Invoke-PSPackageProjectTest
(instead runningInvoke-ModuleTests
frombuildtools.psm1
) - Functional tests look like they depend on some environment variables to be set by AzDO, but these aren't mentioned in the docs
As it stands, running tests deskside is pretty arduous. Improving documentation in this space would help external contributors have a little more confidence in the viability of their proposed changes.