Cannot install hiera by brew I am on macOS High Sierra

The first command (http://macappstore.org/hiera/) 

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


looks OK

The 2nd command results in the error:

brew install caskroom/cask/brew-cask


However, as I understand it is not needed now.

The 3rd command results in the error:

brew cask install hiera
==&gt; Satisfying dependencies
==&gt; Downloading https://downloads.puppetlabs.com/mac/hiera-1.3.4.dmg
Already downloaded: /Users/anarinsky/Library/Caches/Homebrew/Cask/hiera--1.3.4.dmg
==&gt; Verifying checksum for Cask hiera
==&gt; Installing Cask hiera
==&gt; Running installer for hiera; your password may be necessary.
==&gt; Package installers may write to any location; options such as -- 
appdir are ignored.
Password: 
==&gt; installer: Package name is hiera-1.3.4
==&gt; installer: Installing at base path /
==&gt; installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
==&gt; Purging files for version 1.3.4 of Cask hiera
Error: Command failed to execute!
==&gt; Failed command:
/usr/bin/sudo -E -- /usr/sbin/installer -pkg 
/usr/local/Caskroom/hiera/1.3.4/hiera-1.3.4.pkg -target /

==&gt; Standard Output of failed command:
installer: Package name is hiera-1.3.4
installer: Installing at base path /
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
==&gt; Standard Error of failed command:
==&gt; Exit status of failed command:
#&lt;Process::Status: pid 10228 exit 1&gt;


I suspect that installing at the base path /  does not work.
Short answer

Please try brew cask install puppet-agent. Hiera is included.

More details

I tried installing the https://downloads.puppetlabs.com/mac/hiera-1.3.4.dmg file that the cask recipe install manually and got the following warning:


  This package is incompatible with this version of OS X and may fail to >install.
  
  Installing this package may damage your system, and the installation may >fail. To stop the program and the installation, click “Cancel >Installation”.


I did some googling and found that 1.3.4 is very old.

from: https://tickets.puppetlabs.com/browse/HI-533


  Hiera 1.3.4 is old (> 2 years). Much older than OSx 10.11.6. There are >later releases of hiera,"


from: https://docs.puppet.com/hiera/3.1/


  To get started with Hiera, you’ll need to do all of the following:
  
  Make sure it’s installed. Hiera ships with Puppet agent, so install the >puppet-agent package if you haven’t already. (Linux, Windows, OS X.)