Prefix artifact source with only_path

This commit is contained in:
Harry Marr 2022-10-22 10:54:51 -04:00
parent b11df3bef8
commit 2d68e27d7b
No known key found for this signature in database
GPG Key ID: EC359447F66859CC

View File

@ -51,7 +51,9 @@ module Cask
target = target_hash[:target]
@source_string = source.to_s
@target_string = target.to_s
source = cask.staged_path.join(source)
base_path = cask.staged_path
base_path = base_path.join(cask.url.only_path) if cask.url && cask.url.only_path.present?
source = base_path.join(source)
@source = source
target ||= source.basename
@target = resolve_target(target)