Skip to content

Commit

Permalink
Use relative paths when importing the local Gutenberg podspec
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed May 25, 2023
1 parent 8d6451e commit 6f74940
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Gutenberg/cocoapods_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

require 'archive/tar/minitar'
require 'net/http'
require 'pathname'
require 'ruby-progressbar'
require 'uri'
require 'zlib'
Expand Down Expand Up @@ -89,7 +90,9 @@ def gutenberg_pod(config: GUTENBERG_CONFIG)

gutenberg_dependencies(options: options)
elsif options[:commit]
pod 'Gutenberg', path: File.join(__dir__, 'gutenberg.podspec')
# Notice the use of relative path, otherwise we'd get the full path of the user that run the `pod install` command tracked in Podfile.lock.
# Also notice the path is relative from Dir.pwd, that is, the location where the script running this code is invoked.
pod 'Gutenberg', path: Pathname.new(File.join(__dir__, 'Gutenberg.podspec')).relative_path_from(Dir.pwd).to_s
end
end
# rubocop:enable Metrics/AbcSize
Expand Down

0 comments on commit 6f74940

Please sign in to comment.