Skip to content

Commit 5bf8dac

Browse files
committed
Escape the configuration name (or derived values) when executing commands
1 parent 1b2aa67 commit 5bf8dac

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/cocoapods-binary-cache/pod-rome/xcodebuild_command.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,16 @@ def create_xcframework(target)
102102
# for each sdk, the order of params must be -framework then -debug-symbols
103103
# to prevent duplicated file error when copying dSYMs
104104
sdks.each do |sdk|
105-
cmd << "-framework" << framework_path_of(target, sdk)
105+
cmd << "-framework" << framework_path_of(target, sdk).shellescape
106106

107107
unless disable_dsym?
108108
dsyms = dsym_paths_of(target, sdk)
109-
cmd += dsyms.map { |dsym| "-debug-symbols #{dsym}" }
109+
cmd += dsyms.map { |dsym| "-debug-symbols #{dsym.shellescape}" }
110110
end
111111

112112
if bitcode_enabled?
113113
bcsymbolmaps = bcsymbolmap_paths_of(target, sdk)
114-
cmd += bcsymbolmaps.map { |bcsymbolmap| "-debug-symbols #{bcsymbolmap}" }
114+
cmd += bcsymbolmaps.map { |bcsymbolmap| "-debug-symbols #{bcsymbolmap.shellescape}" }
115115
end
116116
end
117117

@@ -181,7 +181,7 @@ def merge_contents(target, path_suffix, &merger)
181181
def create_fat_binary(options)
182182
cmd = ["lipo", " -create"]
183183
cmd << "-output" << options[:output]
184-
cmd << options[:simulator] << options[:device]
184+
cmd << options[:simulator].shellescape << options[:device].shellescape
185185
`#{cmd.join(" ")}`
186186
end
187187

lib/cocoapods-binary-cache/pod-rome/xcodebuild_raw.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def self.xcodebuild(options)
2121
cmd = ["xcodebuild"]
2222
cmd << "-project" << options[:sandbox].project_path.realdirpath.shellescape
2323
targets.each { |target| cmd << "-target" << target }
24-
cmd << "-configuration" << options[:configuration]
24+
cmd << "-configuration" << options[:configuration].shellescape
2525
cmd << "-sdk" << sdk
2626
if DESTINATION_OF_SDK.key?(sdk)
2727
cmd << "-destination" << DESTINATION_OF_SDK[sdk]

0 commit comments

Comments
 (0)