This repository was archived by the owner on Jul 31, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
lib/fastlane/plugin/xcodegen/actions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,14 +15,14 @@ def self.run(params)
1515 end )
1616
1717 cmd = [ "xcodegen" ]
18- cmd << "--spec #{ params [ :spec ] } " if params [ :spec ]
19- cmd << "--project #{ params [ :project ] } " if params [ :project ]
18+ cmd += [ "--spec" , File . expand_path ( params [ :spec ] ) ] if params [ :spec ]
19+ cmd += [ "--project" , File . expand_path ( params [ :project ] ) ] if params [ :project ]
2020 cmd << "--quiet" if params [ :quiet ]
2121 cmd << "--use-cache" if params [ :use_cache ]
22- cmd << "--cache-path #{ params [ :cache_path ] } " if params [ :cache_path ]
23- cmd << "--project-root #{ params [ :project_root ] } " if params [ :project_root ]
22+ cmd += [ "--cache-path" , File . expand_path ( params [ :cache_path ] ) ] if params [ :cache_path ]
23+ cmd += [ "--project-root" , File . expand_path ( params [ :project_root ] ) ] if params [ :project_root ]
2424
25- Actions . sh ( cmd . join ( ' ' ) )
25+ Actions . sh ( * cmd )
2626 end
2727
2828 def self . description
Original file line number Diff line number Diff line change 1717 end
1818 it "sets the project param" do
1919 result = Fastlane ::FastFile . new . parse ( "lane :test do
20- xcodegen(project: '/tmp/Project.xcodeproj')
20+ xcodegen(project: '/tmp/My Project.xcodeproj')
2121 end" ) . runner . execute ( :test )
2222
23- expect ( result ) . to eq ( " xcodegen --project /tmp/Project.xcodeproj" )
23+ expect ( result ) . to eq ( ' xcodegen --project /tmp/My\ Project.xcodeproj' )
2424 end
2525 it "sets the quiet param" do
2626 result = Fastlane ::FastFile . new . parse ( "lane :test do
4141 xcodegen(cache_path: '~/.xcodegen/cache/MyProject')
4242 end" ) . runner . execute ( :test )
4343
44- expect ( result ) . to eq ( "xcodegen --cache-path ~/.xcodegen/cache/MyProject" )
44+ cache_path = File . expand_path ( "~/.xcodegen/cache/MyProject" )
45+ expect ( result ) . to eq ( "xcodegen --cache-path #{ cache_path } " )
4546 end
4647 it "sets the project-root param" do
4748 result = Fastlane ::FastFile . new . parse ( "lane :test do
48- xcodegen(project_root: '../ ')
49+ xcodegen(project_root: '/tmp/project-root ')
4950 end" ) . runner . execute ( :test )
5051
51- expect ( result ) . to eq ( "xcodegen --project-root ../ " )
52+ expect ( result ) . to eq ( "xcodegen --project-root /tmp/project-root " )
5253 end
5354 it "ignores the quiet and use-cache params if false" do
5455 result = Fastlane ::FastFile . new . parse ( "lane :test do
You can’t perform that action at this time.
0 commit comments