Skip to content

Add configurable lock file path support for filesystem compatibility#491

Merged
dvaumoron merged 2 commits intotofuutils:mainfrom
MrKeiKun:fix-480-adjustable-lock-file-path
Oct 5, 2025
Merged

Add configurable lock file path support for filesystem compatibility#491
dvaumoron merged 2 commits intotofuutils:mainfrom
MrKeiKun:fix-480-adjustable-lock-file-path

Conversation

@MrKeiKun
Copy link
Copy Markdown
Contributor

@MrKeiKun MrKeiKun commented Oct 3, 2025

Description
Added support for configuring a separate lock file location via the TENV_LOCK_PATH environment variable. When set, lock files are created in the specified directory instead of TENV_ROOT.

Referenced Issue: #480

Usage Examples

# Default behavior (unchanged)
export TENV_ROOT=~/.tenv
tenv tf install 1.0.0

# Custom lock directory for S3 compatibility
export TENV_ROOT=/mnt/s3/tenv-versions
export TENV_LOCK_PATH=/tmp/tenv-locks
tenv tf install 1.0.0  # Creates /tmp/tenv-locks/tf.lock

Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
@kvendingoldo
Copy link
Copy Markdown
Collaborator

it looks fine for me, @dvaumoron can you check it too, please?

@MrKeiKun MrKeiKun requested a review from dvaumoron October 5, 2025 13:52
Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
@MrKeiKun MrKeiKun force-pushed the fix-480-adjustable-lock-file-path branch from 4058074 to e74db60 Compare October 5, 2025 13:54
@dvaumoron dvaumoron merged commit c8adcbe into tofuutils:main Oct 5, 2025
4 checks passed
@kvendingoldo
Copy link
Copy Markdown
Collaborator

Thank you for review @dvaumoron!

@kvendingoldo
Copy link
Copy Markdown
Collaborator

kvendingoldo commented Oct 5, 2025

@MrKeiKun may I ask you to create a 2nd PR with readme.md update? I think that we need to tell users about _LOCK_PATH env variable and how to use it. Thanks

@kvendingoldo
Copy link
Copy Markdown
Collaborator

issue for that: #302

diofeher pushed a commit to diofeher/tenv that referenced this pull request Nov 6, 2025
…ofuutils#491)

* Add configurable lock file path to decouple from TENV_ROOT
* Eliminate duplication and improve lockfile API design.

Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
diofeher pushed a commit to diofeher/tenv that referenced this pull request Nov 6, 2025
…ofuutils#491)

* Add configurable lock file path to decouple from TENV_ROOT
* Eliminate duplication and improve lockfile API design.

Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants