From 72ebaddcb82448e24238f4d398505c0218c2bdd5 Mon Sep 17 00:00:00 2001 From: GovorovViva64 <60960482+GovorovViva64@users.noreply.github.com> Date: Thu, 4 Mar 2021 23:22:09 +0300 Subject: [PATCH] Handle possible whitespaces in project path for PVS-Studio (#3849) --- platformio/commands/check/tools/pvsstudio.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/platformio/commands/check/tools/pvsstudio.py b/platformio/commands/check/tools/pvsstudio.py index 88b1a513..d4dde208 100644 --- a/platformio/commands/check/tools/pvsstudio.py +++ b/platformio/commands/check/tools/pvsstudio.py @@ -187,7 +187,13 @@ class PvsStudioCheckTool(CheckToolBase): # pylint: disable=too-many-instance-at flags = self.cc_flags compiler = self.cc_path - cmd = [compiler, src_file, "-E", "-o", self._tmp_preprocessed_file] + cmd = [ + compiler, + '"%s"' % src_file, + "-E", + "-o", + '"%s"' % self._tmp_preprocessed_file, + ] cmd.extend([f for f in flags if f]) cmd.extend(["-D%s" % d for d in self.cpp_defines]) cmd.append('@"%s"' % self._tmp_cmd_file)