config: distinguish a non-file VICTORY_CONFIG from a missing one #1254

Open
github-bot wants to merge 1 commit from github-bot/gh-1254 into main AGit
Owner

@⁠RennfahrerU on GitHub · 2026-11-26 02:48 UTC · original
RennfahrerU:fix/config-not-a-file → main · +58 −11 · 1 files · 1 commits · open

When VICTORY_CONFIG pointed at a path that existed but was not a file (for example a directory), load() reported "which does not exist" -- wrong and confusing. Report "which is not a file" in that case and keep "does not exist" for a path that is truly absent.

The file-selection logic moves into a small locate_config helper so it can be unit-tested without mutating the process environment, matching how the rest of this module is tested. Four tests cover the new helper.

Assisted-by: AI tools

**@⁠RennfahrerU** on GitHub · 2026-11-26 02:48 UTC · [original](https://github.com/fxceless/victory-fork/pull/1254) `RennfahrerU:fix/config-not-a-file` → `main` · +58 −11 · 1 files · 1 commits · open When VICTORY_CONFIG pointed at a path that existed but was not a file (for example a directory), load() reported "which does not exist" -- wrong and confusing. Report "which is not a file" in that case and keep "does not exist" for a path that is truly absent. The file-selection logic moves into a small `locate_config` helper so it can be unit-tested without mutating the process environment, matching how the rest of this module is tested. Four tests cover the new helper. Assisted-by: AI tools
When VICTORY_CONFIG pointed at a path that existed but was not a file
(for example a directory), load() reported "which does not exist" --
wrong and confusing. Report "which is not a file" in that case and keep
"does not exist" for a path that is truly absent.

The file-selection logic moves into a small `locate_config` helper so it
can be unit-tested without mutating the process environment, matching how
the rest of this module is tested. Four tests cover the new helper.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:00:26 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1254/head:github-bot/gh-1254'
git switch 'github-bot/gh-1254'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1254'
git switch 'github-bot/gh-1254'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1254'
git switch 'github-bot/gh-1254'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1254'
git switch 'main'
git merge --squash 'github-bot/gh-1254'
git switch 'main'
git merge --ff-only 'github-bot/gh-1254'
git switch 'main'
git merge 'github-bot/gh-1254'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.