Azure / Azure/azure-devops-cli-extension

[Bug] Az CLI does not pass along exit code from ArtifactTools

Open
#1,048 0 comments 0 reactions 0 assignees View on GitHub
Area: ProToCol bug
Dominant language
Python
Stars
682
Forks
278
Avg merge
3d 23h
Merged PRs (30d)
3

Description

When artifacttools return an exit code from [this ](https://dev.azure.com/mseng/AzureDevOps/_git/ArtifactTool?path=%2Fsrc%2FArtifactTool%2FErrorCode.cs) list it doesn't get pass along to AZ cli interface and always show exit code 1.

Azure-Devops extension version: :
azure-devops (0.18.0)

Steps to reproduce the behavior:
Trigger any error listed in the list above. For example, attempting to publish a package where the version already existed before. No information of the exit code can be found with --debug flag on. However, running external command for artifacttools directly will change environmental variable $LASTEXITCODE to the correct exit code.

**Debug logs**
![Screenshot](https://user-images.githubusercontent.com/32987404/92638691-855e0d00-f28f-11ea-8c61-7008d793ec66.png)

Related bugs created in Azure DevOps:
https://dev.azure.com/mseng/AzureDevOps/_workitems/edit/1308350
https://dev.azure.com/mseng/AzureDevOps/_workitems/edit/1302921

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.