Open sssmc opened 4 months ago
I had the same issue on my system where my username contains a space. Thanks to the clues from @sssmc I was able to find the affected file and adjust it to quote the path. After making the change, I was able to successfully run the inspection tool.
In my case, I needed to change C:\Users\Adam Waller\.platformio\penv\Lib\site-packages\platformio\check\tools\base.py
line 93 as shown below:
# I changed this
cmd = "echo | %s -x %s %s %s -dM -E -" % (
# To this
cmd = 'echo | "%s" -x %s %s %s -dM -E -' % (
I am happy to provide a PR if that would be helpful.
What kind of issue is this?
[ ] Question. This issue tracker is not the place for questions. If you want to ask how to do something, or to understand why something isn't working the way you expect it to, use Community Forums or Premium Support
[ ] PlatformIO IDE. All issues related to PlatformIO IDE should be reported to the PlatformIO IDE for VSCode repository
[ ] Development Platform or Board. All issues (building, uploading, adding new boards, etc.) related to PlatformIO development platforms should be reported to appropriate repository related to your hardware https://github.com/topics/platformio-platform
[ ] Feature Request. Start by telling us what problem you’re trying to solve. Often a solution already exists! Don’t send pull requests to implement new features without first getting our support. Sometimes we leave features out on purpose to keep the project small.
[x] PlatformIO Core. If you’ve found a bug, please provide an information below.
You can erase any parts of this template not applicable to your Issue.
Configuration
Operating system: Windows 11 Version 23H2(OS Build 22631.3447)
PlatformIO Version (
platformio --version
): PlatformIO Core, version 6.1.15Description of problem
Running static code analysis in a project with a project path containing spaces cause the analysis to fail.
Steps to Reproduce
1.Start static code analysis from the inspect menu
Actual Results
Expected Results
Successfully completed analysis.
Additional info
Path to project folder:
C:\Users\Sebastien Robitaille\Documents\git\BugTesting
Performing the analysis with a identical project that had a path not containing no spaces yielded no errors.The error appears to originate from: platformio/project/helpers.py
I just wanted to get some consensus that this is the cause of this issue before attempting a pull request.