Skip to content

Commit 9e793e1

Browse files
committed
fix: support windows in run-task (#850)
Taskgraph's version of `run-task` does not currently support Windows. After some investigation, it looks like much of https://bugzilla.mozilla.org/show_bug.cgi?id=1459737 was already ported to it - the only thing that we need to change is to relocate the POSIX-specific imports into a POSIX-specific function.
1 parent d378a9b commit 9e793e1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/taskgraph/run-task/run-task

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ current time to improve log usefulness.
1616
import argparse
1717
import datetime
1818
import errno
19-
import grp
2019
import io
2120
import json
2221
import os
2322
import platform
24-
import pwd
2523
import re
2624
import shutil
2725
import socket
@@ -311,6 +309,9 @@ def run_command(prefix, args, *, extra_env=None, cwd=None):
311309

312310

313311
def get_posix_user_group(user, group):
312+
import grp # noqa: PLC0415
313+
import pwd # noqa: PLC0415
314+
314315
try:
315316
user_record = pwd.getpwnam(user)
316317
except KeyError:

0 commit comments

Comments
 (0)