Skip to content

Commit 0a16fd1

Browse files
authored
fix: pod_lib_lint.rb should print copy-and-paste friendly command (#15630)
1 parent aaea12b commit 0a16fd1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/pod_lib_lint.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def main(args)
8484
command.push('--analyze') if analyze
8585

8686
command.push(*pod_args)
87-
puts command.join(' ')
87+
# Quote arguments containing curly braces to ensure they are treated as literal strings
88+
# by the shell when the command is copy-pasted, preventing unintended brace expansion.
89+
puts command.map { |arg| arg =~ /[{}]/ ? "'#{arg}'" : arg }.join(' ')
8890

8991
# Run the lib lint command in a thread.
9092
pod_lint_status = 1

0 commit comments

Comments
 (0)