Skip to content

Bug in build.ps1 for template "AzureFunction" #196

Description

@jklotzsche-msft

Isssue
When executing the build.ps1 script, the files "run.ps1" and "function.json" for each function are empty.
Tested using PowerShell 7.4.2

Reason
Line 31 + 32:

$httpCode = Get-Content -Path "$PSScriptRoot\functionHttp\run.ps1" | Join-String "`n"

$httpConfig = Get-Content -Path "$PSScriptRoot\functionHttp\function.json" | Join-String "`n"

By using Join-String with positional parameter, the parameter "Property" is used.

Solution
Correct would be "Seperator".
Therefore, when you add the parameter name it works:

$httpCode = Get-Content -Path "$PSScriptRoot\functionHttp\run.ps1" | Join-String -Separator "`n"

$httpConfig = Get-Content -Path "$PSScriptRoot\functionHttp\function.json" | Join-String -Separator "`n"

Please add the parameter name :-) Thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions