lib/rim/upload_helper.rb in esr-rim-1.3.3 vs lib/rim/upload_helper.rb in esr-rim-1.3.4
- old
+ new
@@ -14,10 +14,12 @@
# upload all module changes into corresponding remote repositories
def upload
# get the name of the current workspace branch
RIM::git_session(@ws_root) do |s|
branch = s.current_branch
- if !branch.start_with?("rim/")
+ if branch.nil?
+ raise RimException.new("Not on a git branch.")
+ elsif !branch.start_with?("rim/")
begin
sha1 = s.rev_sha1(branch)
@logger.info("Uploading modules...")
upload_modules(get_upload_revisions(s, sha1))
ensure