Error when pulling from PowerShell script

后端 未结 2 1675
我寻月下人不归
我寻月下人不归 2021-01-14 12:02

I have a simple PowerShell script to keep a folder up-to-date with its git repository.

Param(
    [Parameter(Mandatory = $true)][string]$branch,
    [string]         


        
2条回答
  •  不知归路
    2021-01-14 12:48

    I have encountered this behavior in the past with git commands and PowerShell, I don't know exactly why PS print the success response like an error but I solved it in this way:

    $output = git pull 2>&1
    Write-Host $output
    

提交回复
热议问题