skywind3000 / skywind3000/z.lua

Powershell is unable to initialise z.lua when the path exceeds 4096 characters

Open
#234 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
3.1k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

PS > Invoke-Expression (& { (lua C:\Users\chenx\scoop\apps\z.lua\current\z.lua --init powershell) -join "`n" })
C:\Users\chenx\scoop\apps\lua\current\lua55.exe: C:\Users\chenx\scoop\apps\z.lua\current\z.lua:508: attempt to index a nil value (local 'output')
stack traceback:
C:\Users\chenx\scoop\apps\z.lua\current\z.lua:508: in function <C:\Users\chenx\scoop\apps\z.lua\current\z.lua:497>
(...tail calls...)
C:\Users\chenx\scoop\apps\z.lua\current\z.lua:2781: in global 'z_windows_init'
C:\Users\chenx\scoop\apps\z.lua\current\z.lua:2010: in global 'main'
C:\Users\chenx\scoop\apps\z.lua\current\z.lua:2991: in main chunk
[C]: in ?
Invoke-Expression: Cannot bind argument to parameter 'Command' because it is an empty string.

Lua version: 5.5.0
z.lua version: 1.8.25

Contributor guide

No contributing guide indexed for this repository

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 with z.lua lines 497-508 and the z_windows_init entry point named in the traceback. Reproduce the failure by running the shown PowerShell initialization command with a path exceeding 4096 characters, then inspect why output is nil. Done means initialization produces a non-empty command and Invoke-Expression completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.