Skip to content

Commit 69dc672

Browse files
Replace use of os.DirFS with os.OpenRoot
followup to 2b4780c addressing an instance introduced concurrently with the changes made there.
1 parent 8932b55 commit 69dc672

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/ghasum/atoms.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,19 @@ func compute(cfg *Config, actions []gha.GitHubAction, algo checksum.Algo) ([]sum
129129
}
130130

131131
if cfg.Transitive {
132+
repo, _ := os.OpenRoot(actionDir)
133+
132134
var transitive []gha.GitHubAction
133135
switch action.Kind {
134136
case gha.Action:
135-
tmp, err := gha.ManifestActions(os.DirFS(actionDir), action.Path)
137+
tmp, err := gha.ManifestActions(repo.FS(), action.Path)
136138
if err != nil {
137139
return nil, fmt.Errorf("action manifest parsing failed for %s: %v", action, err)
138140
}
139141

140142
transitive = tmp
141143
case gha.ReusableWorkflow:
142-
tmp, err := gha.WorkflowActions(os.DirFS(actionDir), action.Path)
144+
tmp, err := gha.WorkflowActions(repo.FS(), action.Path)
143145
if err != nil {
144146
return nil, fmt.Errorf("reusable workflow parsing failed for %s: %v", action, err)
145147
}

0 commit comments

Comments
 (0)