Skip to content

Powershell build.ps1 script throws error logging an error #25

Closed
@goofballLogic

Description

@goofballLogic

If an error occurs during the CoreCLR run, it tries to execute a cmd-let called "Error-Log" which, at least on my system, is not defined:


Error-Log : The term 'Error-Log' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\src\json-ld.net\build.ps1:61 char:5
+     Error-Log "Tests failed!!!"
+     ~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Error-Log:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Note that the .NET 4 version of the run doesn't use this cmdlet - instead it just uses Write-Host.

Am I doing something wrong or should I send a PR to use Write-Host for the CoreCLR portion too?

This is in reference to https://github.com/NuGet/json-ld.net/blob/master/build.ps1#L58

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions