diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-21 16:10:55 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-21 16:11:38 +0900 |
| commit | 6546ddc64bcbf73c7419bac7af596b924005dbc3 (patch) | |
| tree | 5e09262421b52a2ce626200c79d67f36fac74b94 /internal/rosa/make.go | |
| parent | cbf18b302d51c3e667ebe06cfebb14b90ccc93b7 (diff) | |
internal/rosa: expose in-place behaviour in generic helper
This change also combines the createDir and wantsDir methods, and replaces the non-inplace target of the generic helper with a deterministic path.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/make.go')
| -rw-r--r-- | internal/rosa/make.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/rosa/make.go b/internal/rosa/make.go index 793509c9..a3e3d8e3 100644 --- a/internal/rosa/make.go +++ b/internal/rosa/make.go @@ -82,15 +82,12 @@ func (attr *MakeHelper) scriptEarly() string { return generate } -// createDir returns false. -func (*MakeHelper) createDir() bool { return false } - // wantsDir requests a new directory in TMPDIR, or omits the cd statement if InPlace. -func (attr *MakeHelper) wantsDir() string { +func (attr *MakeHelper) wantsDir() (string, bool) { if attr != nil && attr.InPlace { - return helperInPlace + return helperInPlace, false } - return `"$(mktemp -d)"` + return `"$(mktemp -d)"`, false } // script generates the cure script. |
