Skip to content

Commit b573256

Browse files
authored
feat: powershell ansi output and dynamic sizing (#7793)
Set $PSStyle.OutputRendering to Ansi and pipe output to Out-String to enable dynamic host sizing and better readability. Close #7445
1 parent 19a4b8c commit b573256

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/functions/worker.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function LintCodebase() {
205205
if [[ "${FILE_TYPE}" == "ARM" ]] ||
206206
[[ "${FILE_TYPE}" == "POWERSHELL" ]]; then
207207
# Run as a Powershell command
208-
LINTER_COMMAND_ARRAY=(pwsh -NoProfile -NoLogo -Command "\"${LINTER_COMMAND_ARRAY[*]}; if (\\\${Error}.Count) { exit 1 }\"")
208+
LINTER_COMMAND_ARRAY=(pwsh -NoProfile -NoLogo -Command "\"\\\$PSStyle.OutputRendering = 'Ansi'; ${LINTER_COMMAND_ARRAY[*]} | Out-String; if (\\\${Error}.Count) { exit 1 }\"")
209209
fi
210210

211211
debug "LINTER_COMMAND_ARRAY for ${FILE_TYPE} has ${#LINTER_COMMAND_ARRAY[@]} elements after initializing command arguments: ${LINTER_COMMAND_ARRAY[*]}"

0 commit comments

Comments
 (0)