lib/bolt/application.rb
# List policies available to the project.
#
# @return [Hash]
#
List policies available to the project.
List policies available to the project .
def list_policies
      unless @config.policies
        command = Bolt::Util.powershell? ? 'New-BoltPolicy -Name <NAME>' : 'bolt policy new <NAME>'
        raise Bolt::Error.new(
          "Project configuration file #{@config.project.project_file} does not "\
          "specify any policies. You can add policies to the project by including "\
          "a 'policies' key or creating a new policy using the '#{command}' "\
          "command.",
          'bolt/no-policies-error'
        )
      end
      { policies: @config.policies.uniq, modulepath: pal.user_modulepath }
    end
def list_policies unless @config . policies command = Bolt :: Util . powershell? ? 'New-BoltPolicy -Name <NAME>' : 'bolt policy new <NAME>' raise Bolt :: Error . new ( "Project configuration file #{@config.project.project_file} does not " "specify any policies. You can add policies to the project by including " "a 'policies' key or creating a new policy using the '#{command}' " "command." , 'bolt/no-policies-error' ) end { policies : @config . policies . uniq , modulepath : pal . user_modulepath } end
List policies available to the project.
List policies available to the project .
None
Hash