class Pfm::Command::Format

def fmt

def fmt
  raise InvalidRepository, 'This doesn\'t look like a valid infrastructure repository' unless File.directory? "#{inf_base_dir}/tf"
  tf_paths = %W[#{inf_base_dir}/tf lib/tf/modules]
  begin
    tf_paths.each do |path|
      # Format the file to a canonical syntax
      Terraform::Binary.fmt(path)
    end
  rescue
    raise DeploymentFailure, 'Finished with errors'
  end
end