   defp get_wsl_paths(file) do
     {win_path, 0} = System.cmd("cmd.exe", ["/c", "cd"])
     win_path = String.trim(win_path) <> "\\#{file}"
-    drive_letter = 
+
+    drive_letter =
       Regex.run(~r/(.*?):\\/, win_path)
       |> Enum.at(1)
       |> String.downcase()
+
     wsl_path = "/mnt/" <> drive_letter <> "/" <> Regex.replace(~r/(.*?):\\/, win_path, "")
     wsl_path = Regex.replace(~r/\\/, wsl_path, "/")
     {win_path, wsl_path}

  end

  defp get_devs do
    {result, 0} = 
      if is_wsl?() do
        {win_path, wsl_path} = get_wsl_paths("fwup_devs.txt")
        System.cmd("powershell.exe", ["-Command", "Start-Process powershell.exe -Verb runAs -Wait -ArgumentList \"fwup.exe -D | set-content -encoding UTF8 #{win_path}\""])
       
        {:ok, devs} = File.read(wsl_path) 
        devs = 
          Regex.replace(~r/[\x{200B}\x{200C}\x{200D}\x{FEFF}]/u, devs, "")
          |> String.replace("\r", "")


  end

  defp is_wsl? do
    # using system.cmd("cat", ...) here is simpler
    # https://stackoverflow.com/questions/29874941/elixir-file-read-returns-empty-data-when-accessing-proc-cpuinfo/29875499
    if File.exists?("/proc/sys/kernel/osrelease") do
      System.cmd("cat", ["/proc/sys/kernel/osrelease"])
      |> elem(0)
      |> (&Regex.match?(~r/Microsoft/, &1)).()
    else
      false
    end
