Closed Bug 1789311 Opened 3 years ago Closed 3 years ago

bootstrap.py fails when Powershell is installed on a Linux system

Categories

(Firefox Build System :: General, defect, P3)

Firefox 104
defect

Tracking

(firefox106 fixed)

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: huangalex409, Assigned: ahochheiden)

Details

Attachments

(2 files)

Attached file bootstrap.py

Steps to reproduce:

  • download and install Powershell for Linux (from Github)
  • download and run the bootstrap.py file

Actual results:

when run python3 throws an error
File "/home/teapot/bootstrap.py", line 284, in add_microsoft_defender_antivirus_exclusions
ctypes.windll.shell32.ShellExecuteW(None, "runas", powershell_exe, command, None, 0)
AttributeError: module 'ctypes' has no attribute 'windll'

Expected results:

bootstrap.py should not have attempted to call ctypes.windll as this function is native to Windows and is not available on Linux.

Component: Untriaged → General
Product: Firefox → Firefox Build System

Interesting, I didn't know PowerShell was available outside of Windows. Pretty easy fix, I'll take care of it.

Assignee: nobody → ahochheiden
Severity: -- → S3
Priority: -- → P3

Since PowerShell is also available on Linux, checking for that is not
sufficient. We must first check if we're on Windows, and if we're not,
return early.

Pushed by ahochheiden@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/054c56d730df Only attempt to add Microsoft Defender Antivirus Exclusion on Windows r=firefox-build-system-reviewers,nalexander
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: