We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d976937 commit 67566f1Copy full SHA for 67566f1
lib/mix/lib/mix/scm/git.ex
@@ -59,6 +59,10 @@ defmodule Mix.SCM.Git do
59
60
def update(opts) do
61
File.cd! opts[:dest], fn ->
62
+ # Ensures origin is set the lock repo
63
+ location = location(opts[:git])
64
+ update_origin(location)
65
+
66
command = "git fetch --force --progress"
67
if opts[:tag] do
68
command = command <> " --tags"
@@ -143,6 +147,10 @@ defmodule Mix.SCM.Git do
143
147
|> iolist_to_binary
144
148
end
145
149
150
+ defp update_origin(location) do
151
+ System.cmd('git config remote.origin.url #{location}')
152
+ end
153
146
154
defp run_cmd_or_raise(command) do
155
if Mix.shell.cmd(command) != 0 do
156
raise Mix.Error, message: "Command `#{command}` failed"
0 commit comments