You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think a much more future-proof, clean and safe (with respect to various kinds of injections when running commands on untrusted hosts) way is to use a proper serialization (JSON/XML) for transport. It is even much easier to handle the results on pyinfra's side while simply switching from Get-ItemProperty -Path C:\Windows to Get-ItemProperty -Path C:\Windows | ConvertTo-Json and possibly requesting only a subset of fields for efficiency.
Is your feature request related to a problem? Please describe
As
Get-ItemProperty
output is different → parsing failsWindows PowerShell 5.1
PowerShell 7
In addition the output is colored:
Describe the solution you'd like
facts/windows_files.py
→class File(FactBase):
→process
methodfacts/util/win_files.py
→WIN_LS_REGEX
definition, relax the filetype and mode patternfacts/util/win_files.py
→parse_win_ls_output
function, remove ansi sequencesThe text was updated successfully, but these errors were encountered: