commands/package: Nicer error if includes has symlinks [GH-3200]
This commit is contained in:
parent
b20ff91784
commit
d8ec7b02c4
|
@ -13,6 +13,7 @@ BUG FIXES:
|
||||||
fail [GH-3391]
|
fail [GH-3391]
|
||||||
- core: `vagrant` on Windows cmd.exe doesn't always exit with exit
|
- core: `vagrant` on Windows cmd.exe doesn't always exit with exit
|
||||||
code zero. [GH-3420]
|
code zero. [GH-3420]
|
||||||
|
- commands/package: Nice error if includes contain symlinks. [GH-3200]
|
||||||
- commands/rsync-auto: Don't crash if the machine can't be communicated
|
- commands/rsync-auto: Don't crash if the machine can't be communicated
|
||||||
to. [GH-3419]
|
to. [GH-3419]
|
||||||
- guests/fedora: Fix hostname setting. [GH-3382]
|
- guests/fedora: Fix hostname setting. [GH-3382]
|
||||||
|
|
|
@ -72,6 +72,11 @@ module Vagrant
|
||||||
FileUtils.cp(from, to, :preserve => true)
|
FileUtils.cp(from, to, :preserve => true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
rescue Errno::EEXIST => e
|
||||||
|
raise if !e.to_s.include?("symlink")
|
||||||
|
|
||||||
|
# The directory contains symlinks. Show a nicer error.
|
||||||
|
raise Errors::PackageIncludeSymlink
|
||||||
end
|
end
|
||||||
|
|
||||||
# Compress the exported file into a package
|
# Compress the exported file into a package
|
||||||
|
|
|
@ -456,6 +456,10 @@ module Vagrant
|
||||||
error_key(:include_file_missing, "vagrant.actions.general.package")
|
error_key(:include_file_missing, "vagrant.actions.general.package")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class PackageIncludeSymlink < VagrantError
|
||||||
|
error_key(:package_include_symlink)
|
||||||
|
end
|
||||||
|
|
||||||
class PackageOutputDirectory < VagrantError
|
class PackageOutputDirectory < VagrantError
|
||||||
error_key(:output_is_directory, "vagrant.actions.general.package")
|
error_key(:output_is_directory, "vagrant.actions.general.package")
|
||||||
end
|
end
|
||||||
|
|
|
@ -789,6 +789,10 @@ en:
|
||||||
You can however, install a plugin with the same name to replace
|
You can however, install a plugin with the same name to replace
|
||||||
these plugins. User-installed plugins take priority over
|
these plugins. User-installed plugins take priority over
|
||||||
system-installed plugins.
|
system-installed plugins.
|
||||||
|
package_include_symlink: |-
|
||||||
|
A file or directory you're attempting to include with your packaged
|
||||||
|
box has symlinks in it. Vagrant cannot include symlinks in the
|
||||||
|
resulting package. Please remove the symlinks and try again.
|
||||||
provider_not_found: |-
|
provider_not_found: |-
|
||||||
The provider '%{provider}' could not be found, but was requested to
|
The provider '%{provider}' could not be found, but was requested to
|
||||||
back the machine '%{machine}'. Please use a provider that exists.
|
back the machine '%{machine}'. Please use a provider that exists.
|
||||||
|
|
Loading…
Reference in New Issue