Skip to content

Commit

Permalink
fix(plc4go/tools): fix infinite loop when reaching root
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Oct 9, 2024
1 parent 1e2a7da commit e763903
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plc4go/tools/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func GetLicenseFileContent(licenseFileName string, verbose bool) []byte {
}
licenseFileNameWithPath = filepath.Join(currentDir, licenseFileName)
if _, err := os.Stat(licenseFileNameWithPath); errors.Is(err, os.ErrNotExist) {
if currentDir == "/" {
return nil
}
// path/to/whatever does not exist
currentDir = filepath.Join(currentDir, "..")
continue
Expand Down

0 comments on commit e763903

Please sign in to comment.