Skip to content

Instantly share code, notes, and snippets.

@bltavares
Last active August 29, 2015 13:57
Show Gist options
  • Save bltavares/9403911 to your computer and use it in GitHub Desktop.
Save bltavares/9403911 to your computer and use it in GitHub Desktop.
$ sudo dpkg -i project_1.0_amd64.deb
(Reading database ... 222072 files and directories currently installed.)
Unpacking project (from project_1.0_amd64.deb) ...
dpkg: error processing project_1.0_amd64.deb (--install):
error creating hard link `./usr/local/bin/project-bin': No such file or directory
Errors were encountered while processing:
project_1.0_amd64.deb
index 43794fa..3c0080e 100644
--- a/lib/fpm/package/dir.rb
+++ b/lib/fpm/package/dir.rb
@@ -132,7 +132,7 @@ class FPM::Package::Dir < FPM::Package
end
# For single file copies, permit file destinations
- if File.file?(source) && !File.directory?(destination)
+ if (File.file?(source) || File.symlink?(source)) && !File.directory?(destination)
if destination[-1,1] == "/"
copy(source, File.join(destination, source))
else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment