Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Invoke-requirement fail if set action is not defined #66

Description

Hi,
following your video i found this:

$requirements = @(
@{

    Describe = 'Folder tempi present in the system'
    Test     = { test-path -path 'c:/temp' }
    #Set      = { new-item -ItemType Directory -Path 'c:/temp'}
}

)

c:/temp still is not created, but the command fail:
pplyRequirement : Failed to apply Requirement 'Folder tempi present in the system'
At C:\Program Files\WindowsPowerShell\Modules\Requirements\2.3.6\src\core.ps1:49 char:23

  • $Requirements | % { applyRequirement $_ }
  •                   ~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,applyRequirement

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions