Closed Bug 1589596 Opened 6 years ago Closed 5 years ago

Have glean_parser warn before deleting files it may not have created

Categories

(Data Platform and Tools :: Glean: SDK, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: brizental, Assigned: mdroettboom)

Details

(Whiteboard: [telemetry:glean-rs:m11])

glean_parser deletes all the contents in the output directory before generating files. That might be a problematic feature for the unwarned.

This situation happened to me: I ran glean_parser translate -o . -f markdown metrics.yaml and it just deleted my whole folder without asking twice.

I propose we check what we are deleting before doing so, and if any of the contents that will be deleted don't look like they should (i.e. don't look like they were created by glean_parser), we could warn before doing so.

Whiteboard: [telemetry:glean-rs:m?] → [telemetry:glean-rs:m11]

Let's reject if there's '.' provided as the output dir.

Assignee: nobody → mdroettboom
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.