Closed Bug 2089658 Opened 23 days ago Closed 22 days ago

`mach ts check` hangs when run from outside the source tree

Categories

(Developer Infrastructure :: Linting and Formatting: JavaScript, defect)

defect

Tracking

(firefox162 fixed)

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: dao, Assigned: dao)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

Running ./mach ts check (or another mach ts subcommand that installs the TypeScript modules, e.g. mach ts paths) with a working directory outside the source tree hangs at 100% CPU.

maybe_setup in tools/ts/mach_commands.py calls setup_helper.eslint_maybe_setup(package_name="TypeScript") without a package_root. set_project_root in tools/lint/eslint/setup_helper.py then walks up from os.getcwd() looking for mach, and never stops at /.

Passing ctx.topsrcdir as package_root fixes it for mach ts. set_project_root should probably also stop once os.path.dirname(folder) == folder.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
Component: Lint and Formatting → Linting and Formatting: JavaScript
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: