Skip to content

Commit

Permalink
Merge pull request #919 from nanoc/better-deploy-target-error
Browse files Browse the repository at this point in the history
Improve missing deploy target error message
  • Loading branch information
denisdefreyne committed Jul 24, 2016
2 parents 10ae5bf + 05011e6 commit a26aa9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/nanoc/cli/commands/deploy.rb
Expand Up @@ -62,8 +62,7 @@ def deploy_config

target = options.fetch(:target, :default).to_sym
deploy_configs.fetch(target) do
# FIXME: target name is unobvious
raise Nanoc::Int::Errors::GenericTrivial, "The site has no deployment configuration for #{target}."
raise Nanoc::Int::Errors::GenericTrivial, "The site has no deployment configuration named `#{target}`."
end
end

Expand Down
4 changes: 2 additions & 2 deletions spec/nanoc/cli/commands/deploy_spec.rb
Expand Up @@ -202,7 +202,7 @@
it 'errors' do
expect { run }.to raise_error(
Nanoc::Int::Errors::GenericTrivial,
'The site has no deployment configuration for default.',
'The site has no deployment configuration named `default`.',
)
end

Expand Down Expand Up @@ -257,7 +257,7 @@
it 'errors' do
expect { run }.to raise_error(
Nanoc::Int::Errors::GenericTrivial,
'The site has no deployment configuration for production.',
'The site has no deployment configuration named `production`.',
)
end

Expand Down

0 comments on commit a26aa9c

Please sign in to comment.