mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-03-02 18:00:18 +00:00
21 lines
361 B
Go
21 lines
361 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
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{})
|
|
}
|