Skip to content

Commit

Permalink
feat:support auto search toolchain, issue: #272
Browse files Browse the repository at this point in the history
  • Loading branch information
tbs60 committed Aug 8, 2024
1 parent 81e28e6 commit c12fe72
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/backend/booster/bk_dist/handler/common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ func FormatFilePath(f string) string {
func GetAllLinkFiles(f, workdir string) []string {
fs := []string{}
tempf := f
// avoid dead loop
maxTry := 10
try := 0
for {
loopagain := false
i := dcFile.Lstat(tempf)
Expand All @@ -371,6 +374,13 @@ func GetAllLinkFiles(f, workdir string) []string {

loopagain = true
tempf = originFile

try++
if try >= maxTry {
loopagain = false
blog.Infof("common util: symlink %s may be drop in dead loop", tempf)
break
}
}
}

Expand Down

0 comments on commit c12fe72

Please sign in to comment.