fix: quoting args if lua directive and not --ignore-lua#751
Open
brunotvs wants to merge 1 commit intolunarmodules:masterfrom
Open
fix: quoting args if lua directive and not --ignore-lua#751brunotvs wants to merge 1 commit intolunarmodules:masterfrom
brunotvs wants to merge 1 commit intolunarmodules:masterfrom
Conversation
Member
|
@brunotvs apologies for the long delay, any chance you can rebase this on current master? Thx! |
Author
|
@Tieske, done. |
Member
|
@brunotvs what happened? the change set is much bigger now? and most are unrelated formatting things. Is this on purpose? |
Author
|
Sorry, must've forgotten to disable autofmt. |
Tieske
reviewed
Mar 7, 2026
busted/modules/cli.lua
Outdated
Comment on lines
+216
to
+219
| for _, arg in ipairs(args) do | ||
| local a = arg:gsub('"', '\\"') | ||
| table.insert(quoted, a) | ||
| end |
Member
There was a problem hiding this comment.
Can we make this slightly more compact?
Suggested change
| for _, arg in ipairs(args) do | |
| local a = arg:gsub('"', '\\"') | |
| table.insert(quoted, a) | |
| end | |
| for i, arg in ipairs(args) do | |
| quoted[i] = arg:gsub('"', '\\"') | |
| end |
busted/modules/cli.lua
Outdated
| end | ||
| local _, code = execute( | ||
| cliArgs['lua']..' '..args[0] or ''..' --ignore-lua '..table.concat(args, ' ') | ||
| cliArgs["lua"] .. " " .. args[0] .. ' --ignore-lua ' .. end_args |
Member
There was a problem hiding this comment.
You removed the or fallback here, was that on purpose?
Suggested change
| cliArgs["lua"] .. " " .. args[0] .. ' --ignore-lua ' .. end_args | |
| cliArgs["lua"] .. " " .. (args[0] or "") .. ' --ignore-lua ' .. end_args |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #750