mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4394] [Other] START-HERE.bat: the & goto :eof escapes the if — the Python search stops after the first probe #1947
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1947
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TheHubUser4860938 on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4394
Problem: START-HERE.bat :findpy, lines 61-64. cmd parses
if <cond> cmd1 & cmd2as TWO commands: the& goto :eofsits OUTSIDE the if (the classic unparenthesized-& trap). So line 61 (if not errorlevel 1 set "PY=py -3" & goto :eof) returns from the subroutine after thepy -3probe REGARDLESS of whether it succeeded — and lines 62-63 (python on PATH) and line 64 (the per-user %LOCALAPPDATA%\Programs\Python\Python31x fallbacks) are dead code.Environment:
Strata Version: 0.2.7 (source checkout at tag v0.2.7, commit
5e8a4cca; file byte-identical)OS: Windows semantics (found in a Linux checkout; no cmd available here)
Consequence: a Windows PC whose Python is reachable as
pythonbut not via thepylauncher (conda, embedded distro, custom installs) is told to install Python anyway; and after the script's OWN per-user install (the current cmd session never sees the updated PATH), the line-64 fallback written for exactly that moment never runs, so the script prints "Python could not be installed automatically... double-click START-HERE.bat again." A latent extra: line 64's own& goto :eofalso lands outside the loop body — if reached, the loop would run all four exist-checks with the last match (the OLDEST installed version) winning.Expected:
if <cond> (cmd1 & cmd2)— or split lines — so each probe is actually tried in order.Reproduction status: unconfirmed static analysis (documented cmd parsing rule; not executed here). What would verify: on a Windows box with python on PATH but no py launcher, run START-HERE.bat --check and watch it miss the found Python.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.