Merge pull request #5399 from delftswa2014/improve-package-error-message

Improved the package error message
This commit is contained in:
Seth Vargo 2015-05-30 12:32:19 -07:00
commit 03b945d4d0
2 changed files with 4 additions and 3 deletions

View File

@ -29,9 +29,10 @@ module Vagrant
def call(env)
@env = env
file_name = File.basename(@env["package.output"].to_s)
raise Errors::PackageOutputDirectory if File.directory?(tar_path)
raise Errors::PackageOutputExists if File.exist?(tar_path)
raise Errors::PackageOutputExists, file_name:file_name if File.exist?(tar_path)
raise Errors::PackageRequiresDirectory if !env["package.directory"] ||
!File.directory?(env["package.directory"])

View File

@ -1749,7 +1749,7 @@ en:
packaging: "Packaging additional file: %{file}"
compressing: "Compressing package to: %{tar_path}"
output_exists: |-
The specified file to save the package as already exists. Please
The specified file '%{file_name}' to save the package as already exists. Please
remove this file or specify a different file name for outputting.
output_is_directory: |-
The specified output is a directory. Please specify a path including