     location = opts[:git]
 
     _ = File.rm_rf!(path)
-    command  = ~s(git clone --no-checkout --progress "#{location}" "#{path}")
-
-    run_cmd_or_raise(command)
+    cmd = "git"
+    args = ~w( clone --no-checkout --progress )
+    args = args ++ [location, path]
+
+    run_cmd_or_raise(cmd, args)
     File.cd! path, fn -> do_checkout(opts) end
   end
 

  end

  defp get_rev_info do
    destructure [origin, rev],
      :os.cmd('git --git-dir=.git config remote.origin.url && git --git-dir=.git rev-parse --verify --quiet HEAD')
      |> IO.iodata_to_binary
      |> String.split("\n", trim: true)
    [ origin: origin, rev: rev ]
  end

  defp update_origin(location) do
    _ = :os.cmd('git --git-dir=.git config remote.origin.url #{location}')
    :ok
  end

  defp run_cmd_or_raise(command) do
    if Mix.shell.cmd(command) != 0 do
      Mix.raise "Command `#{command}` failed"
    end
    true
  end


  defp do_checkout(opts) do
    ref = get_lock_rev(opts[:lock]) || get_opts_rev(opts)
    run_cmd_or_raise("git", ["--git-dir=.git", "checkout", "--quiet", ref])

    if opts[:submodules] do
      run_cmd_or_raise("git", ["--git-dir=.git" , "submodule", "update", "--init", "--recursive"])
    end

    get_lock(opts)
