3 function Write-PipelineTelemetryError
{
4 local telemetry_category
=''
7 while [[ $# -gt 0 ]]; do
8 opt
="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
15 function_args
+=("$1 $2")
25 if [[ "$ci" != true
]]; then
30 message
="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message"
31 function_args
+=("$message")
33 Write-PipelineTaskError
$function_args
36 function Write-PipelineTaskError
{
37 if [[ "$ci" != true
]]; then
42 local message_type
="error"
48 while [[ $# -gt 0 ]]; do
49 opt
="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
79 local message
="##vso[task.logissue"
81 message
="$message type=$message_type"
83 if [ -n "$sourcepath" ]; then
84 message
="$message;sourcepath=$sourcepath"
87 if [ -n "$linenumber" ]; then
88 message
="$message;linenumber=$linenumber"
91 if [ -n "$columnnumber" ]; then
92 message
="$message;columnnumber=$columnnumber"
95 if [ -n "$error_code" ]; then
96 message
="$message;code=$error_code"
103 function Write-PipelineSetVariable
{
104 if [[ "$ci" != true
]]; then
111 local as_output
=false
112 local is_multi_job_variable
=true
114 while [[ $# -gt 0 ]]; do
115 opt
="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
131 -is_multi_job_variable|
-i)
132 is_multi_job_variable
=$2
140 value
=${value/\\r/%0D}
141 value
=${value/\\n/%0A}
144 local message
="##vso[task.setvariable variable=$name;isSecret=$secret;isOutput=$is_multi_job_variable]$value"
146 if [[ "$as_output" == true
]]; then
153 function Write-PipelinePrependPath
{
154 local prepend_path
=''
156 while [[ $# -gt 0 ]]; do
157 opt
="$(echo "${1/#--/-}" | awk '{print tolower($0)}')"
167 export PATH
="$prepend_path:$PATH"
169 if [[ "$ci" == true
]]; then
170 echo "##vso[task.prependpath]$prepend_path"