diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2020-01-08 12:26:56 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2020-01-08 13:07:36 +0000 |
commit | 9cc149852645455ad481c1fef521622d6fd79791 (patch) | |
tree | 8227fc8f4af621a3b3bec465c2a8a7efa62046ee /src/lib | |
parent | 5c28285248fa55167f94fc41e883e8c1f4ac0450 (diff) |
MSVC: Avoid bad execution attempt of powershell
If the user opted in for telemetry, vsdevcmd.bat tries to execute
powershell.
The batch file clears the PATH, so powershell cannot be used.
Change-Id: I80e457aebea9d8c1c8ba0415d50d809bfd0bd4da
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/corelib/tools/vsenvironmentdetector.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/corelib/tools/vsenvironmentdetector.cpp b/src/lib/corelib/tools/vsenvironmentdetector.cpp index f8f98e7b7..2490a5cdb 100644 --- a/src/lib/corelib/tools/vsenvironmentdetector.cpp +++ b/src/lib/corelib/tools/vsenvironmentdetector.cpp @@ -233,6 +233,8 @@ void VsEnvironmentDetector::writeBatchFile(QIODevice *device, const QString &vcv << QStringLiteral("WindowsSDKVersion") << QStringLiteral("VSINSTALLDIR"); QTextStream s(device); s << "@echo off" << endl; + // Avoid execution of powershell (in vsdevcmd.bat), which is not in the cleared PATH + s << "set VSCMD_SKIP_SENDTELEMETRY=1" << endl; for (const MSVC *msvc : msvcs) { s << "echo --" << msvc->architecture << "--" << endl << "setlocal" << endl; |