Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@jklotzsche-msft

Description

@jklotzsche-msft
Issue body actions

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!

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.