Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Log error when package current/new name is the same
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsawicki committed Jul 31, 2014
1 parent cf4f79b commit 6522277
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/publish.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ class Publish extends Command

# Rename package if necessary
renamePackage: (pack, name, callback) ->
if name?.length > 0 and pack.name isnt name
if name?.length > 0
return callback('The new package name must be different than the name in the package.json file') if pack.name is name

message = "Renaming #{pack.name} to #{name} "
process.stdout.write(message)
@setPackageName pack, name, (error) =>
Expand Down

0 comments on commit 6522277

Please sign in to comment.