A file in the shared folder the links point into, written with `content` when given.
(name: string, content?: string)
| 2611 | } |
| 2612 | /** A file in the shared folder the links point into, written with `content` when given. */ |
| 2613 | function sharedFile(name: string, content?: string): string { |
| 2614 | const file = path.join(tmpHome, 'dotfiles', name); |
| 2615 | fs.mkdirSync(path.dirname(file), { recursive: true }); |
| 2616 | if (content !== undefined) fs.writeFileSync(file, content); |
| 2617 | return file; |
| 2618 | } |
| 2619 | |
| 2620 | // Every file each agent's install writes, at both locations: whatever the |
| 2621 | // installer does, it never replaces or removes a link. |
no test coverage detected