Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 8b610da

Browse files
committed
Fix infinite recursive call
fmt.Sprint would call the String function on the FileMode, which again would call fmt.Sprint, looping like this forever. Instead, we now call the String function that's already implemented on os.FileMode
1 parent 08f9ba4 commit 8b610da

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

internals/cli/filemode/filemode.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
package filemode
33

44
import (
5-
"fmt"
65
"os"
76
"strconv"
87

@@ -48,7 +47,7 @@ func (m *FileMode) Set(value string) error {
4847

4948
// String implements the flag.Value interface.
5049
func (m FileMode) String() string {
51-
return fmt.Sprint(m)
50+
return m.FileMode().String()
5251
}
5352

5453
// FileMode returns the file mode as an os.FileMode.

0 commit comments

Comments
 (0)