Skip to content

Commit 0f9f8e2

Browse files
committed
Better explanation for "WindowsError: [Error 5]"
1 parent 08cd5c7 commit 0f9f8e2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/installer/stages/platformio-core.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ export default class PlatformIOCoreStage extends BaseStage {
202202
if (code === 0) {
203203
return resolve(stdout);
204204
} else {
205-
return reject(`Virtualenv Create: ${stderr}`);
205+
let userNotification = `Virtualenv Create: ${stderr}`;
206+
if (stderr.includes('WindowsError: [Error 5]')) {
207+
userNotification = `If you use Antivirus, it can block PlatformIO Installer. Try to disable it for a while.\n\n${userNotification}`;
208+
}
209+
return reject(userNotification);
206210
}
207211
}
208212
);

0 commit comments

Comments
 (0)