Skip to content

Commit

Permalink
chore: Update User-Agent string in Lambda Tools for PS (#1739)
Browse files Browse the repository at this point in the history
  • Loading branch information
96malhar authored Apr 24, 2024
1 parent 914746c commit 773ec7a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PowerShell/Module/AWSLambdaPSCore.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'AWSLambdaPSCore.psm1'

# Version number of this module.
ModuleVersion = '4.0.0.0'
ModuleVersion = '4.0.1.0'

# Supported PSEditions
CompatiblePSEditions = 'Core'
Expand Down
14 changes: 13 additions & 1 deletion PowerShell/Module/Private/_DeploymentFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,19 @@ function _deployProject

$amazonLambdaToolsPath = _configureAmazonLambdaTools

$env:AWS_EXECUTION_ENV="AWSLambdaPSCore"
$moduleVersion = "Unknown"
$module = $MyInvocation.MyCommand.Module
if ($module) {
$moduleVersion = $module.Version.ToString()
}

$userAgent = "lib/AWSLambdaPSCore#$moduleVersion"
if ($env:AWS_EXECUTION_ENV) {
$env:AWS_EXECUTION_ENV += " $userAgent"
} else {
$env:AWS_EXECUTION_ENV = "AWSLambdaPSCore $userAgent"
}

try
{
if ($DisableInteractive)
Expand Down

0 comments on commit 773ec7a

Please sign in to comment.