Skip to content

Set-BuildEnvironment errors if git is not installed. #57

Description

@juanfperezperez

Related to #37
When using Set-BuildEnvironment to create the variables in a Linux container that does not have git installed the build script fails because git is not installed. I'm currently getting around it by installing git in a before_script, but that should not be necessary, since I don't use git in these tasks. An option to omit the git check should enable us to not have to install git in order to use this function.

Setting Build Variables
ERROR: The term 'git' 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 /root/.local/share/powershell/Modules/BuildHelpers/1.0.1/Public/Get-BuildVariables.ps1:78 char:21
+         $GitPath = (Get-Command $GitPath)[0].Path
+                     ~~~~~~~~~~~~~~~~~~~~
Build FAILED. 0 tasks, 1 errors, 0 warnings 00:00:12.6075315
Get-Command : The term 'git' 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 /root/.local/share/powershell/Modules/BuildHelpers/1.0.1/Public/Get-BuildVariables.ps1:78 char:21
+         $GitPath = (Get-Command $GitPath)[0].Path
+                     ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (git:String) [Get-Command], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions