From 5fb0f50e81296db185b3291c4da56e220a3ee098 Mon Sep 17 00:00:00 2001
From: Konstantin Tyukalov
<52399739+KonstantinTyukalov@users.noreply.github.com>
Date: Mon, 23 Oct 2023 11:30:17 +0400
Subject: [PATCH] [PowerShell SDK] Add Invoke-VstsProcess (#978)
* Update package-lock
* Add Invoke-Process function
* Add Invoke-Process to members list
* Fix $LastExitCode
* Revert VstsTaskSdk crlf changes
* Revert "refactor: remove Q library from Powershell SDK in favor of native promises (#944)"
This reverts commit 44e727df221e785e8f72fbf0b061ff9651204b09.
* Fix proc exit code
* Update Invoke-Process
* Fix SupportsWorkingDirectory test
* Remove encoding param, update encoding test
* Fix path in test
* update loc resources
* Revert "Revert "refactor: remove Q library from Powershell SDK in favor of native promises (#944)""
This reverts commit a703a0a5bd38a83b804a43ea81128311d03ca4f0.
* Gen doc
* Update changelog
---
powershell/Docs/Commands.md | 1648 +++++++++--------
.../Docs/FullHelp/Invoke-VstsProcess.md | 86 +
powershell/Docs/ReleaseNotes.md | 4 +
.../Invoke-Process.ReturnsCorrectExitCode.ps1 | 16 +
.../Invoke-Process.SupportsOutputEncoding.ps1 | 56 +
...nvoke-Process.SupportsWorkingDirectory.ps1 | 39 +
powershell/VstsTaskSdk/ToolFunctions.ps1 | 103 +-
powershell/VstsTaskSdk/VstsTaskSdk.psm1 | 1 +
powershell/package-lock.json | 611 +-----
9 files changed, 1161 insertions(+), 1403 deletions(-)
create mode 100644 powershell/Docs/FullHelp/Invoke-VstsProcess.md
create mode 100644 powershell/Tests/L0/Invoke-Process.ReturnsCorrectExitCode.ps1
create mode 100644 powershell/Tests/L0/Invoke-Process.SupportsOutputEncoding.ps1
create mode 100644 powershell/Tests/L0/Invoke-Process.SupportsWorkingDirectory.ps1
diff --git a/powershell/Docs/Commands.md b/powershell/Docs/Commands.md
index dee6bf7ee..ed2f5ca70 100644
--- a/powershell/Docs/Commands.md
+++ b/powershell/Docs/Commands.md
@@ -1,806 +1,842 @@
-# Commands (v0.11.0)
-## Table of Contents
-* [Find](#find)
- * [Find-VstsMatch](#find-vstsmatch)
- * [New-VstsFindOptions](#new-vstsfindoptions)
- * [New-VstsMatchOptions](#new-vstsmatchoptions)
- * [Select-VstsMatch](#select-vstsmatch)
-* [Input](#input)
- * [Get-VstsEndpoint](#get-vstsendpoint)
- * [Get-VstsInput](#get-vstsinput)
- * [Get-VstsSecureFileName](#get-vstssecurefilename)
- * [Get-VstsSecureFileTicket](#get-vstssecurefileticket)
- * [Get-VstsTaskVariable](#get-vststaskvariable)
- * [Get-VstsTaskVariableInfo](#get-vststaskvariableinfo)
- * [Set-VstsTaskVariable](#set-vststaskvariable)
-* [Legacy Find](#legacyfind)
- * [Find-VstsFiles](#find-vstsfiles)
-* [Localization](#localization)
- * [Get-VstsLocString](#get-vstslocstring)
- * [Import-VstsLocStrings](#import-vstslocstrings)
-* [Logging Command](#loggingcommand)
- * [Write-VstsAddAttachment](#write-vstsaddattachment)
- * [Write-VstsAddBuildTag](#write-vstsaddbuildtag)
- * [Write-VstsAssociateArtifact](#write-vstsassociateartifact)
- * [Write-VstsLogDetail](#write-vstslogdetail)
- * [Write-VstsPrependPath](#write-vstsprependpath)
- * [Write-VstsSetEndpoint](#write-vstssetendpoint)
- * [Write-VstsSetProgress](#write-vstssetprogress)
- * [Write-VstsSetResult](#write-vstssetresult)
- * [Write-VstsSetSecret](#write-vstssetsecret)
- * [Write-VstsSetVariable](#write-vstssetvariable)
- * [Write-VstsTaskDebug](#write-vststaskdebug)
- * [Write-VstsTaskError](#write-vststaskerror)
- * [Write-VstsTaskVerbose](#write-vststaskverbose)
- * [Write-VstsTaskWarning](#write-vststaskwarning)
- * [Write-VstsUpdateBuildNumber](#write-vstsupdatebuildnumber)
- * [Write-VstsUpdateReleaseName](#write-vstsupdatereleasename)
- * [Write-VstsUploadArtifact](#write-vstsuploadartifact)
- * [Write-VstsUploadBuildLog](#write-vstsuploadbuildlog)
- * [Write-VstsUploadFile](#write-vstsuploadfile)
- * [Write-VstsUploadSummary](#write-vstsuploadsummary)
-* [Server OM](#serverom)
- * [Get-VstsAssemblyReference](#get-vstsassemblyreference)
- * [Get-VstsClientCertificate](#get-vstsclientcertificate)
- * [Get-VstsTfsClientCredentials](#get-vststfsclientcredentials)
- * [Get-VstsTfsService](#get-vststfsservice)
- * [Get-VstsVssCredentials](#get-vstsvsscredentials)
- * [Get-VstsVssHttpClient](#get-vstsvsshttpclient)
- * [Get-VstsWebProxy](#get-vstswebproxy)
-* [Tool](#tool)
- * [Assert-VstsAgent](#assert-vstsagent)
- * [Assert-VstsPath](#assert-vstspath)
- * [Invoke-VstsTool](#invoke-vststool)
-* [Trace](#trace)
- * [Trace-VstsEnteringInvocation](#trace-vstsenteringinvocation)
- * [Trace-VstsLeavingInvocation](#trace-vstsleavinginvocation)
- * [Trace-VstsPath](#trace-vstspath)
-
-## Find
-### Find-VstsMatch
-[table of contents](#toc) | [full](FullHelp/Find-VstsMatch.md)
-```
-NAME
- Find-VstsMatch
-
-SYNOPSIS
- Finds files using match patterns.
-
-SYNTAX
- Find-VstsMatch [[-DefaultRoot] ] [[-Pattern] ] [[-FindOptions]