canonical / canonical/chisel

Create `--root` directory when missing

Open
#206 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
424
Forks
65
Avg merge
12d 19h
Merged PRs (30d)
1

Description

With Chisel 1.3.0 and earlier, the `--root` directory must exist before running chisel.

Could chisel support creating this directory implicitly if it's missing, or provide an opt-in flag to do so if there's a reason not to support this convenience by default?

```bash
chisel cut --release ubuntu-24.04 --root /root-fs base-files_base
```

> ```
> 2025/03/13 02:45:57 Extracting files from package "base-files"...
> error: cannot extract from package "base-files": target directory does not exist
> ```

---

Related to this error is the timing. `chisel` does not bail early, instead doing quite a bit of work prior to failing. This check should occur much earlier before other operations like network activity?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the chisel cut command's --root handling and the validation that produces "target directory does not exist"; reproduce the example with a missing /root-fs directory. Done means the intended missing-directory behavior is implemented and validation happens before network activity or extraction work.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.