Skip to content

Commit c8378e0

Browse files
committed
replace absolute paths in checks.md not to depend on local file system
1 parent c0edd4d commit c8378e0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/checks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,7 @@ test.yaml:12:5: "with" is only available for a reusable workflow call with "uses
21962196
|
21972197
12 | with:
21982198
| ^~~~~
2199-
test.yaml:19:11: could not read reusable workflow file for "./.github/workflows/not-existing.yml": open /Users/rhysd/.go/src/github.com/rhysd/actionlint/.github/workflows/not-existing.yml: no such file or directory [workflow-call]
2199+
test.yaml:19:11: could not read reusable workflow file for "./.github/workflows/not-existing.yml": open /path/to/repo/.github/workflows/not-existing.yml: no such file or directory [workflow-call]
22002200
|
22012201
19 | uses: ./.github/workflows/not-existing.yml
22022202
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

scripts/update-checks-doc/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ func runActionlint(src []byte) ([]byte, error) {
6868
return nil, err
6969
}
7070

71-
return out.Bytes(), nil
71+
// Some error message contains absolute file paths. Replace them not to make the document depend
72+
// on the current file system.
73+
b := bytes.ReplaceAll(out.Bytes(), []byte(p.RootDir()), []byte("/path/to/repo"))
74+
75+
return b, nil
7276
}
7377

7478
func update(in []byte) ([]byte, error) {

0 commit comments

Comments
 (0)