lib/teapot/controller/fetch.rb in teapot-0.7.5 vs lib/teapot/controller/fetch.rb in teapot-0.8.0
- old
+ new
@@ -112,15 +112,15 @@
external_url = package.external_url(context.root)
Commands.run("git", "clone", external_url, destination_path, "--branch", branch)
- # Checkout the specific version if it was given:
- if package_lock
- Commands.run("git", "reset", "--hard", package_lock[:commit])
- end
-
Dir.chdir(destination_path) do
+ # Checkout the specific version if it was given:
+ if package_lock
+ Commands.run("git", "reset", "--hard", package_lock[:commit])
+ end
+
Commands.run("git", "submodule", "update", "--init", "--recursive")
end
rescue
log "Removing incomplete package at path #{destination_path}...".color(:red)