mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
feat: Host environment (#1293)
This commit is contained in:
parent
865c4556e0
commit
ab1deb20a5
38 changed files with 1395 additions and 187 deletions
18
act/lookpath/env.go
Normal file
18
act/lookpath/env.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package lookpath
|
||||
|
||||
import "os"
|
||||
|
||||
type Env interface {
|
||||
Getenv(name string) string
|
||||
}
|
||||
|
||||
type defaultEnv struct {
|
||||
}
|
||||
|
||||
func (*defaultEnv) Getenv(name string) string {
|
||||
return os.Getenv(name)
|
||||
}
|
||||
|
||||
func LookPath(file string) (string, error) {
|
||||
return LookPath2(file, &defaultEnv{})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue