class Webpacker::Env

def available_environments

def available_environments
  if config_path.exist?
    YAML.load(config_path.read).keys
  else
    [].freeze
  end
rescue Psych::SyntaxError => e
  raise "YAML syntax error occurred while parsing #{config_path}. " \
        "Please note that YAML must be consistently indented using spaces. Tabs are not allowed. " \
        "Error: #{e.message}"
end