Skip to content
5 changes: 5 additions & 0 deletions src/Functions/Functions.Autorest/custom/HelperFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ $constants["RuntimeToFormattedName"] = @{
'python' = 'Python'
'java' = 'Java'
'powershell' = 'PowerShell'
'unknown' = 'Unknown'
}
$constants["RuntimeToDefaultOSType"] = @{
'DotNet'= 'Windows'
Expand Down Expand Up @@ -2167,6 +2168,10 @@ function GetRuntimeName

$name = $settingHashTable['FUNCTIONS_WORKER_RUNTIME']

if ([string]::IsNullOrWhiteSpace($name)){
Comment thread
MarcusTheCat marked this conversation as resolved.
Outdated
$name = "unknown"
Comment thread
MarcusTheCat marked this conversation as resolved.
Outdated
}
Comment thread
MarcusTheCat marked this conversation as resolved.
Outdated
Comment thread
MarcusTheCat marked this conversation as resolved.

if ($RuntimeToFormattedName.ContainsKey($name))
{
return $RuntimeToFormattedName[$name]
Comment thread
MarcusTheCat marked this conversation as resolved.
Comment thread
MarcusTheCat marked this conversation as resolved.
Expand Down
Loading