Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let extract_source = builddir when more than one folders being extracted #138

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions lib/fpm/cookery/source_handler/curl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,8 @@ def extracted_source
when 1
entries.first
else
# Use the directory that was created last.
dir = entries.sort do |a, b|
File.stat(a).ctime <=> File.stat(b).ctime
end.last

if File.exist?(dir)
dir
else
raise "Could not find source directory for #{local_path.basename}"
end
# Use current dir when more then one dirs being extracted
Dir.pwd
end
end
end
Expand Down