Skip to content

Commit

Permalink
Update languageserver/integration/flow.go
Browse files Browse the repository at this point in the history
Co-authored-by: Supun Setunga <[email protected]>
  • Loading branch information
jribbink and SupunS authored Oct 26, 2023
1 parent 46f089c commit a5c0765
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion languageserver/integration/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ func (f *flowkitClient) GetCodeByName(name string) (string, error) {

// Helper function to get code from a source file location
func (f *flowkitClient) getCodeFromLocation(name, location string) (string, error) {
code, err := f.loader.ReadFile(filepath.Join(filepath.Dir(f.getConfigPath()), location))
dir := filepath.Dir(f.getConfigPath())
path := filepath.Join(dir, location)
code, err := f.loader.ReadFile(path)
if err != nil {
return "", err
}
Expand Down

0 comments on commit a5c0765

Please sign in to comment.