You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sync eng/common directory with azure-sdk-tools for PR 10579 (Azure#45269)
* Support writing .env files from Test Resources
If a language repo opts into it *and* if a `test-resources.bicep` file exists and lints clean of writing secrets *and* if the `.env` file is gitignore'd, write a `.env` file next to `test-resources.bicep`.
* Resolve PR feedback
* Pass -Force for . hidden files on non-Windows
---------
Co-authored-by: Heath Stewart <[email protected]>
# Try detecting repos that support OutFile and defaulting to it
206
-
if (!$CI-and!$PSBoundParameters.ContainsKey('OutFile')-and$IsWindows) {
207
+
if (!$CI-and!$PSBoundParameters.ContainsKey('OutFile')) {
207
208
# TODO: find a better way to detect the language
208
-
if (Test-Path"$repositoryRoot/eng/service.proj") {
209
+
if ($IsWindows-and$Language-eq'dotnet') {
209
210
$OutFile=$true
210
-
Log "Detected .NET repository. Defaulting OutFile to true. Test environment settings would be stored into the file so you don't need to set environment variables manually."
211
+
Log "Detected .NET repository. Defaulting OutFile to true. Test environment settings will be stored into a file so you don't need to set environment variables manually."
212
+
} elseif ($SupportsTestResourcesDotenv) {
213
+
$OutFile=$true
214
+
Log "Repository supports reading .env files. Defaulting OutFile to true. Test environment settings may be stored in a .env file so they are read by tests automatically."
211
215
}
212
216
}
213
217
@@ -342,10 +346,10 @@ try {
342
346
if ($context.Account.Type-eq'User') {
343
347
# Support corp tenant and TME tenant user id lookups
0 commit comments