jay7x / jay7x/pct

Template installation fails when OS tmpdir is on different filesystem/disk

Open
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Template installation code uses `rename()` call internally, that fails when source and destination paths are not on the same filesystem.
There are few options how to solve it:
1. Use temporary directory under template directory path (and mention that in the documentation explicitly), so `rename()` never fails.
2. Just mention that explicitly in the documentation and do nothing.
3. Implement fallback to copy & unlink if rename() fails.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the template installation code and the internal rename() call described in the issue. Compare the three proposed approaches, then verify the chosen behavior when the OS temporary directory and template destination are on different filesystems; done means installation succeeds or the limitation is explicitly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.