[BUG]: Windows io.popen() handles lack lines(), breaking vfox-python installation
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 66/100
Direzione di ricerca
Read internal/plugin/luai/exec.go around the Windows io.popen() override and compare its handle methods with GopherLua’s standard handle API. Add lines() behavior and coverage for line iteration, EOF, and Windows CRLF handling; run the relevant plugin tests. Done when Windows handles support the expected line iteration API and those cases pass.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
Installing Python on Windows fails in the Python plugin's PostInstall hook because the Windows override of io.popen() returns a table with read, write, and close methods, but no lines method.
The Python installer downloads and extracts successfully. Installation then fails while enumerating the extracted MSI packages, before the MSI installation loop begins.
Environment
- OS: Windows 10, build 19045, x64
- Shell: Windows PowerShell 5.1
- vfox: 1.0.13
- vfox-python: 0.6.2
- Requested Python version: 3.14.10
Steps to reproduce
With the Python plugin installed, run:
vfox install [email protected]
The relevant plugin code is:
local listing, listErr = io.popen(windowsCommand.files(msiPath))
-- ...
for file in listing:lines() do
if file:match("%.msi$") then
files[#files + 1] = file
end
end
Actual behavior
Extracting installer...
Cleaning installer...
Installing python...
plugin [PostInstall] method error: <USERPROFILE>\.vfox\plugin\python\lib\util.lua:171: Failed to list installer packages: <USERPROFILE>\.vfox\plugin\python\lib\util.lua:161: attempt to call a non-function object
stack traceback:
[G]: in function 'error'
<USERPROFILE>\.vfox\plugin\python\lib\util.lua:171: in function 'windowsInstallExe'
<USERPROFILE>\.vfox\plugin\python\lib\util.lua:68: in main chunk
(tailcall): ?
[G]: ?
failed to install python
Expected behavior
The Windows io.popen() handle should support handle:lines(), consistently with the standard GopherLua file/process handle API, so existing plugin code can enumerate the installer packages.
Source investigation
- vfox 1.0.13 overrides
io.popen()on Windows in internal/plugin/luai/exec.go. The returned table only definesread,write, andclose. - The Python plugin calls
listing:lines()in lib/util.lua. - Upstream GopherLua 1.1.1 registers a
linesmethod for its standard file/process handles in iolib.go.
This appears to be an API compatibility gap in vfox's Windows override, rather than a PowerShell execution-policy or installer-download problem.
Verified local workaround
Replacing the Python plugin's listing:lines() loop with repeated listing:read("*l") calls resolves the installation failure. The surrounding protected read, pipe-close, exit-status, and empty-list checks were preserved, including rejecting partial results on read failure.
After this change:
- Five isolated Lua cases passed using
vfox plugin test: normal MSI enumeration/filtering, read failure after a partial list, empty list, nonzero listing-process exit code, and pipe-close failure. - A real
vfox install [email protected]completed successfully. - The installed Python reported version 3.14.10; pip reported version 26.2.2.
- Imports of
ssl,sqlite3,ctypes, andtkintersucceeded. - Creating a virtual environment and running its Python and pip succeeded.
Could the Windows io.popen() override implement lines() and add coverage for line iteration, EOF, and Windows CRLF handling? That would fix the underlying incompatibility without requiring each affected plugin to add its own workaround.
- Lingua principale
- Go
- Stelle
- 4k
- Fork
- 167
- Merge medio
- 1g 4h
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di version-fox/vfox
-
[BUG]: A download that answers 403, 429 or 500 is saved as the archive, and the install ends in "Checksum error"Forse già presa @ManasBhole l’ha presa 1 giorno fa. Apertabug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
version-fox/vfox#746 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
version-fox/vfox#743 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Follow-ups of #736: plugin updates, the path.mode default and vfox configForse già presa @linghengqian l’ha presa 16 giorni fa. Apertaplan plugin
version-fox/vfox#737 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature]: Improve the E2E experience for certain plugin repositories on Windows containersForse già presa @linghengqian l’ha presa 17 giorni fa. Apertaenhancement
version-fox/vfox#733 · 2 commenti · 2 reazioni · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: On Windows, `vfox use java@X` doesn't change `java` when a JDK is in the system PATH and a global SDK is setForse già presa @linghengqian l’ha presa 16 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 47/100
version-fox/vfox#732 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di version-fox/vfox
Issue simili
-
bug os:ios
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
hajimehoshi/ebiten#4039 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
open-telemetry/opentelemetry-go-compile-instrumentation#1713 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
JakeChampion/lang#14392 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-butler-finding bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
jordansmall/spindrift#6557 ·
I maintainer di solito rispondono entro 1 giorno