You've already forked go-semantic-release
fix(*): Vendored project dependencies
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
28
vendor/code.gitea.io/sdk/gitea/agent_windows.go
generated
vendored
Normal file
28
vendor/code.gitea.io/sdk/gitea/agent_windows.go
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright 2022 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build windows
|
||||
|
||||
package gitea
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/davidmz/go-pageant"
|
||||
"golang.org/x/crypto/ssh/agent"
|
||||
)
|
||||
|
||||
// hasAgent returns true if pageant is available
|
||||
func hasAgent() bool {
|
||||
return pageant.Available()
|
||||
}
|
||||
|
||||
// GetAgent returns a ssh agent
|
||||
func GetAgent() (agent.Agent, error) {
|
||||
if !hasAgent() {
|
||||
return nil, fmt.Errorf("no pageant available")
|
||||
}
|
||||
|
||||
return pageant.New(), nil
|
||||
}
|
||||
Reference in New Issue
Block a user