feat: refactor requirements.go
This commit is contained in:
parent
55dacbfec2
commit
54f0049c06
2 changed files with 3 additions and 38 deletions
15
cmd/gogitlabber/requirements.go
Normal file
15
cmd/gogitlabber/requirements.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// verify if git is available
|
||||
func verifyGitAvailable() error {
|
||||
_, err := exec.LookPath("git")
|
||||
if err != nil {
|
||||
return fmt.Errorf("git is not installed or not in PATH: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue