Skip to content

Commit 38f0403

Browse files
committed
fix: NixOS dynamically linked binaries, detect upscale binary from PATH instead
1 parent 28edb03 commit 38f0403

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

internal/image/upscale.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,15 @@ func findRealESRGANBinary(destFolder string) (string, error) {
109109

110110
binaryPath := filepath.Join(destFolder, binaryName)
111111

112+
// NixOS does not allow dynamically linked binaries,so just check $PATH for it instead.
113+
path, err := exec.LookPath(binaryName)
114+
if err != nil {
115+
}
116+
117+
if path != "" {
118+
binaryPath = path
119+
}
120+
112121
// Check if binary exists and is executable
113122
info, err := os.Stat(binaryPath)
114123
if err != nil {

0 commit comments

Comments
 (0)