Skip to content

Commit 5e3a2ee

Browse files
committed
Renamed variables
1 parent 4bbf80f commit 5e3a2ee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

internal/provider/authorizationmodel/authorization_model_document_data_source.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,16 @@ func parseModFileToAuthorizationModelProto(modFilePath string) (*openfgav1.Autho
176176

177177
moduleFiles := []transformer.ModuleFile{}
178178
for _, moduleFilePathProperty := range modFile.Contents.Value {
179-
moduleFilePath := filepath.Join(modFileDirectory, moduleFilePathProperty.Value)
179+
originalModuleFilePath := moduleFilePathProperty.Value
180180

181-
moduleFileBytes, err := os.ReadFile(moduleFilePath)
181+
resolvedModuleFilePath := filepath.Join(modFileDirectory, originalModuleFilePath)
182+
moduleFileBytes, err := os.ReadFile(resolvedModuleFilePath)
182183
if err != nil {
183184
return nil, fmt.Errorf("unable to read module file, got error: %s", err)
184185
}
185186

186187
moduleFile := transformer.ModuleFile{
187-
Name: moduleFilePathProperty.Value,
188+
Name: originalModuleFilePath,
188189
Contents: string(moduleFileBytes),
189190
}
190191

0 commit comments

Comments
 (0)