Skip to content

something seriesouly wrong with node-powershell #1

Description

@eyalk11
execute-powershell (MCP)(command: "\nWrite-Host \"=== Before python ===\" -ForegroundColor       
                                           Cyan\nWrite-Host \"About to call python\"\n\n$output = python -c
                                           \"print('hello')\" 2>&1 | Tee-Object -Variable captured\n\nWrite-Host    
                                           \"=== After python ===\" -ForegroundColor Green\nWrite-Host \"Python call
                                            completed\"\n\nWrite-Host \"`n=== Captured Output ===\"\n$captured |    
                                           ForEach-Object { Write-Host $_ }\n\nWrite-Host \"`n=== Result Variable   
                                           ===\"\nWrite-Host $output\n\nWrite-Host \"`nResult without color:        
                                           $output\"\n", workingDirectory: "C:\\gitproj\\chess_analyzer")

It doesn't return output from subprocesses

     Stdout:
     === Before python ===
     About to call python
     === After python ===
     Python call completed

     === Captured Output ===


     === Result Variable ===


     Result without color:

     Stderr:
     (none)

     Working Directory: C:\gitproj\chess_analyze

I change the code a bit to return more.

Windows 10

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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