Test-MtPack
Synopsis
Section titled “Synopsis”Checks a Maester Pack folder the way Install-MtPack does, without installing it or running any of its code.
Syntax
Section titled “Syntax”Test-MtPack [[-Path] <String>] [-Official] [-ProgressAction <ActionPreference>] [<CommonParameters>]Description
Section titled “Description”Use it while writing a pack, and in the pack’s own CI. It reads maester-pack.json, every file and every test, and reports what would stop the pack from being installed (Errors), what an installer is told (Warnings and Findings), the risk the install prompt shows, the test IDs and the digest that the lock file would record. IsValid is $false when there is an error.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”Test-MtPack ./my-packShows whether the pack can be installed, and why not.
Example 2
Section titled “Example 2”if (-not (Test-MtPack).IsValid) { exit 1 }In a pack repository’s CI.
Parameters
Section titled “Parameters”The pack folder, the one that holds maester-pack.json. The current folder by default.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: 1Default value: .Accept pipeline input: FalseAccept wildcard characters: False-Official
Section titled “-Official”Check it as a pack from the maester365 organisation, which may use the names reserved for Maester.
Type: SwitchParameterParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: FalseAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “CommonParameters”This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.