Skip to content

Commit

Permalink
Merge pull request jordansissel#399 from quiffman/version-not-nil
Browse files Browse the repository at this point in the history
Only convert the dashes in version if it exists.
  • Loading branch information
jordansissel committed Apr 5, 2013
2 parents 92cfae2 + 389b3f1 commit f3a096e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fpm/package/rpm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def converted_from(origin)
# Convert any dashes in version strings to underscores.
self.dependencies = self.dependencies.collect do |dep|
name, op, version = dep.split(/\s+/)
if version.include?("-")
if !version.nil? and version.include?("-")
@logger.warn("Dependency package '#{name}' version '#{version}' " \
"includes dashes, converting to underscores")
version = version.gsub(/-/, "_")
Expand Down

0 comments on commit f3a096e

Please sign in to comment.