We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a49dd1 commit d196021Copy full SHA for d196021
cmd/out/main.go
@@ -3,6 +3,7 @@ package main
3
import (
4
"encoding/json"
5
"os"
6
+ "path/filepath"
7
8
resource "github.com/concourse/mock-resource"
9
"github.com/sirupsen/logrus"
@@ -44,6 +45,7 @@ func main() {
44
45
logrus.Fatal("source path is empty")
46
return
47
}
48
+ sourcePath := os.Args[1]
49
50
if req.Source.Log != "" {
51
logrus.Info(req.Source.Log)
@@ -62,7 +64,8 @@ func main() {
62
64
63
65
var version resource.Version
66
if req.Params.Version == "" {
- contents, err := os.ReadFile(req.Params.File)
67
+ path := filepath.Join(sourcePath, req.Params.File)
68
+ contents, err := os.ReadFile(path)
69
if err != nil {
70
logrus.Fatalf("error reading version from file %s: %s", req.Params.File, err)
71
0 commit comments