Skip to content

Commit 251e48a

Browse files
Copilotbytemain
andauthored
Document PowerShell command assumptions
Agent-Logs-Url: https://github.com/version-fox/vfox-python/sessions/62cb80ef-ebad-4aa5-8791-70cc74b8efc5 Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
1 parent 9996985 commit 251e48a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/util.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ local function powerShellQuote(value)
272272
if containsTraversalSegment(value) then
273273
error("PowerShell argument contains unsupported traversal segment: " .. value)
274274
end
275+
-- The generated script is passed to powershell through cmd as a double-quoted -Command argument.
275276
if string.find(value, '"', 1, true) then
276277
error("PowerShell argument contains unsupported quote character: " .. value)
277278
end
@@ -280,6 +281,7 @@ local function powerShellQuote(value)
280281
end
281282

282283
local function powerShellCommand(script)
284+
-- Windows PowerShell is available by default on supported Windows targets.
283285
return "powershell -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command " .. shellQuote(script)
284286
end
285287

0 commit comments

Comments
 (0)