diff --git a/lib/modulesync/repository.rb b/lib/modulesync/repository.rb index 1e50848..ed6d57c 100644 --- a/lib/modulesync/repository.rb +++ b/lib/modulesync/repository.rb @@ -40,6 +40,9 @@ def default_branch def switch(branch:) unless branch branch = default_branch + unless branch + raise "Unable to detect default branch" + end puts "Using repository's default branch: #{branch}" end return if repo.current_branch == branch