Skip to content

Commit c87941d

Browse files
authored
Set the UserAgent for Azure PowerShell (#87)
1 parent 12f969a commit c87941d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ async function main() {
1818
let actionName = 'AzurePowerShellAction';
1919
let userAgentString = (!!userAgentPrefix ? `${userAgentPrefix}+` : '') + `GITHUBACTIONS_${actionName}_${usrAgentRepo}`;
2020
core.exportVariable('AZURE_HTTP_USER_AGENT', userAgentString);
21+
core.exportVariable('AZUREPS_HOST_ENVIRONMENT', userAgentString);
2122

2223
const inlineScript: string = core.getInput('inlineScript', { required: true });
2324
azPSVersion = core.getInput('azPSVersion', { required: true }).trim().toLowerCase();
@@ -45,6 +46,7 @@ async function main() {
4546
FileUtils.deleteFile(ScriptRunner.filePath);
4647
// Reset AZURE_HTTP_USER_AGENT
4748
core.exportVariable('AZURE_HTTP_USER_AGENT', userAgentPrefix);
49+
core.exportVariable('AZUREPS_HOST_ENVIRONMENT', userAgentPrefix);
4850
}
4951
}
5052

0 commit comments

Comments
 (0)