summaryrefslogtreecommitdiff
path: root/sysutils/nix/files/patch-src_libutil_current-process.cc
blob: a8beca7dfbbb8e28938ee13847ccb1adffc7b98f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- src/libutil/current-process.cc.orig	2025-09-13 18:20:31 UTC
+++ src/libutil/current-process.cc
@@ -134,6 +134,11 @@ std::optional<Path> getSelfExe()
             return std::nullopt;
         }
 
+        // error: input string '/usr/ports/sysutils/nix/work/nix-2.31.1/_build/src/nix/nix␀' cannot be represented
+        //    as Nix string because it contains null bytes
+        // So: pop the '\0' character in the string
+        path.pop_back();
+
         return Path(path.begin(), path.end());
 #else
         return std::nullopt;