From d70b2154a6ba68b676c24e7512121a882a7ef963 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 24 Apr 2019 14:35:19 +0200 Subject: Proper shell quoting Had found > sh: -c: line 0: syntax error near unexpected token `(' > sh: -c: line 0: `file /Users/stephan/Software/lo/core/instdir/LibreOffice.app/Contents/Frameworks/LibreOfficePython.framework/Versions/3.5/lib/python3.5/site-packages/setuptools/script (dev).tmpl' in workdir/CustomTarget/instsetoo_native/install/install.phony.log on macOS. Change-Id: I4b01b5f0a292424a60558cdb8b431a3d8dbdf1d4 Reviewed-on: https://gerrit.libreoffice.org/71234 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- solenv/bin/modules/installer/strip.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'solenv') diff --git a/solenv/bin/modules/installer/strip.pm b/solenv/bin/modules/installer/strip.pm index 9a8de5bbbb6d..2074973828ef 100644 --- a/solenv/bin/modules/installer/strip.pm +++ b/solenv/bin/modules/installer/strip.pm @@ -42,7 +42,8 @@ sub _need_to_strip # Check using the "file" command - open (FILE, "file $filename |"); + $filename =~ s/'/'\\''/g; + open (FILE, "file '$filename' |"); my $fileoutput = ; close (FILE); -- cgit