Repository navigation
Set-BuildEnvironment Errors #37
Description
I am changing to the root directory of the module i want to test and running
Set-BuildEnvironment.
I have tried with -Force as well.
Are these error expected,
Maybe I am doing something wrong.
Exception calling "Start" with "0" argument(s): "The system cannot find the file specified"
At C:\Program Files\Windows PowerShell\Modules\Modules\BuildHelpers\Public\Invoke-Git.ps1:96 char:5
-
$null = $p.Start() -
~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- FullyQualifiedErrorId : Win32Exception
Exception calling "WaitForExit" with "0" argument(s): "No process is associated with this object."
At C:\Program Files\Windows PowerShell\Modules\Modules\BuildHelpers\Public\Invoke-Git.ps1:97 char:5
-
$p.WaitForExit() -
~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- FullyQualifiedErrorId : InvalidOperationException
You cannot call a method on a null-valued expression.
At C:\Program Files\Windows PowerShell\Modules\Modules\BuildHelpers\Public\Invoke-Git.ps1:105 char:12
-
if($stdout = $p.StandardOutput.ReadToEnd()) -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\Program Files\Windows PowerShell\Modules\Modules\BuildHelpers\Public\Invoke-Git.ps1:115 char:12
-
if($stderr = $p.StandardError.ReadToEnd()) -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
Exception calling "Start" with "0" argument(s): "The system cannot find the file specified"
At C:\Program Files\Windows PowerShell\Modules\Modules\BuildHelpers\Public\Invoke-Git.ps1:96 char:5
-
$null = $p.Start() -
~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- FullyQualifiedErrorId : Win32Exception
Exception calling "WaitForExit" with "0" argument(s): "No process is associated with this object."
At C:\Program Files\Windows PowerShell\Modules\Modules\BuildHelpers\Public\Invoke-Git.ps1:97 char:5
-
$p.WaitForExit() -
~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [], MethodInvocationException
- FullyQualifiedErrorId : InvalidOperationException
You cannot call a method on a null-valued expression.
At C:\Program Files\Windows PowerShell\Modules\Modules\BuildHelpers\Public\Invoke-Git.ps1:105 char:12
-
if($stdout = $p.StandardOutput.ReadToEnd()) -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\Program Files\Windows PowerShell\Modules\Modules\BuildHelpers\Public\Invoke-Git.ps1:115 char:12
-
if($stderr = $p.StandardError.ReadToEnd()) -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidOperation: (:) [], RuntimeException
- FullyQualifiedErrorId : InvokeMethodOnNull
Activity
RamblingCookieMonster commentedon Aug 9, 2017
Hiyo!
Looks like I need to adjust things to accommodate environments that don't have git - I suspect if you install git and have it in your $env:path, you'll be good.
Cheers!
midacts commentedon Aug 9, 2017
RamblingCookieMonster commentedon Aug 10, 2017
Hiyo!
Alrighty - the latest build on powershellgallery or master branch here will have a change that lets you do something like:
Set-BuildEnvironment -GitPath "C:\path\to\git.exe"Hopefully that helps - cheers!
midacts commentedon Aug 10, 2017
I tried it out this morning and that worked.
Thanks for taking a look at this and releasing a fix.