Skip to content

Publish test package at AGENT_WORKFOLDER if TEMP is not available #8108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

adityapatwardhan
Copy link
Member

@adityapatwardhan adityapatwardhan commented Oct 23, 2018

PR Summary

macOS hosted agents on Azure DevOps do not have $env:TEMP set. In that case, use $env:AGENT_WORKFOLDER

PR Checklist

Copy link
Collaborator

@JamesWTruher JamesWTruher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one comment, and not a blocker in this case

$rootFolder = $env:AGENT_WORKFOLDER
}

$packageRoot = Join-Path $rootFolder ('TestPackage-' + (new-guid))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have both $env:Temp and $env:TF_BUILD be null? Maybe we should have a Test-Path here and throw an error message ... "package path cannot be found"?

Copy link
Member Author

@adityapatwardhan adityapatwardhan Oct 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$env:TEMP should be set in most cases. VSTS macOS hosts seem to be the only place where it is not set. $env:TF_BUILD is always set in VSTS builds. I will keep this as is for now. If we see problems we can address them.

@adityapatwardhan adityapatwardhan merged commit 05e9f78 into PowerShell:master Oct 23, 2018
@adityapatwardhan adityapatwardhan deleted the TestPackageOnMacOs branch October 23, 2018 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants