<commit_before>unless File.exists?(node["firefox_app_path"])

  remote_file "/tmp/firefox.dmg" do
    source node["firefox_download_uri"]
    mode "0644" 
  end
  
  execute "mount firefox dmg" do
    command "hdid /tmp/firefox.dmg"
    user WS_USER
  end
  
  execute "copy firefox to /Applications" do
    command "cp -rf /Volumes/Firefox/Firefox.app #{Regexp.escape(node["firefox_app_path"])}"
  end
  
  execute "unmount dmg" do
    command "hdiutil detach /Volumes/Firefox"
    user WS_USER
  end

  ruby_block "test to see if Firefox was installed" do
    block do
      raise "Firefox install failed" unless File.exists?(node["firefox_app_path"])
    end
  end
end
<commit_msg>Install Firefox as user not as root.<commit_after>unless File.exists?(node["firefox_app_path"])

  remote_file "/tmp/firefox.dmg" do
    source node["firefox_download_uri"]
    mode "0644" 
  end
  
  execute "mount firefox dmg" do
    command "hdid /tmp/firefox.dmg"
    user WS_USER
  end
  
  execute "copy firefox to /Applications" do
    command "cp -rf /Volumes/Firefox/Firefox.app #{Regexp.escape(node["firefox_app_path"])}"
    user WS_USER
  end
  
  execute "unmount dmg" do
    command "hdiutil detach /Volumes/Firefox"
    user WS_USER
  end

  ruby_block "test to see if Firefox was installed" do
    block do
      raise "Firefox install failed" unless File.exists?(node["firefox_app_path"])
    end
  end
end

{'fraction_non_alphanumeric': 0.09588068181818182, 'fraction_numerical': 0.005681818181818182, 'mean_word_length': 3.3487654320987654, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7513754', 'n_tokens_mistral': 509, 'n_tokens_neox': 482, 'n_words': 136}