Skip to content

Error to locate grunt.cmd #27

@fredgate

Description

@fredgate

Since commit eee037c, search of grunt.cmd path fails when the where command is used.
The reason is that the ConsoleToMsBuild attribute has been removed from Exec task so the TaskParameter named ConsoleOutput is no longer filled and the GruntExecutable becomes empty. No error is detected because the command is successfully executed and the ExitCode is 0.
But the GruntExecutable is undefined and the execution of the grunt file failed.

The Grunt target should be restored as it :

         <Exec Command="$(WINDIR)\system32\where.exe grunt"
             ContinueOnError="true"
             IgnoreExitCode="true"
             ConsoleToMsBuild="true"
             Condition=" !Exists('$(GruntExecutable)') ">
             <Output TaskParameter="ExitCode" PropertyName="GruntExitCode" />
             <Output TaskParameter="ConsoleOutput" PropertyName="GruntExecutable" />
         </Exec>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions