From 949583cc64866fb6cd34cdbd28b9a023c5cc11f0 Mon Sep 17 00:00:00 2001 From: Jonas Claesson Date: Sat, 7 Nov 2020 12:36:54 +0100 Subject: [PATCH] Use the clone_url when the anonymous option is set Otherwise the pull fails. --- src/actions/pull_or_clone.litcoffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/actions/pull_or_clone.litcoffee b/src/actions/pull_or_clone.litcoffee index acc428a..2936b80 100644 --- a/src/actions/pull_or_clone.litcoffee +++ b/src/actions/pull_or_clone.litcoffee @@ -15,7 +15,10 @@ For a repository, pull it or clone it by shelling. action = "git --work-tree=#{repo_in_dir} --git-dir=#{repo_in_dir}/.git fetch --all" else console.log "#{'cloning'.magenta} #{repo.name.blue} in #{repo_in_dir.blue}" - action = "git clone --recursive #{repo.ssh_url} #{repo_in_dir}" + if options['--anonymous'] + action = "git clone --recursive #{repo.clone_url} #{repo_in_dir}" + else + action = "git clone --recursive #{repo.ssh_url} #{repo_in_dir}" resolve action .then (action) -> new Promise (resolve, reject) ->