zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 97ec9fdd7929880699179f5024b8bb93ac424ee2 (tree)
parent 78a7543056112a1df8951712a746b9adb59787af
Author: Sébastien Marie <semarie@online.fr>
Date:   Sun, 11 Oct 2020 08:23:37 +0000

opensd: selfExePath: do not rely on environment as it could be inherited

Diffstat:
Mlib/std/fs.zig | 6------
1 file changed, 0 insertions(+), 6 deletions(-)

diff --git a/lib/std/fs.zig b/lib/std/fs.zig @@ -2268,12 +2268,6 @@ pub fn selfExePath(out_buffer: []u8) SelfExePathError![]u8 { } } - if (os.getenv("_")) |sh_exefile| { - // sh (or bash) sets "_" environment variable - mem.copy(u8, out_buffer, sh_exefile); - return out_buffer[0..sh_exefile.len]; - } - // sorry, we don't find it return error.FileNotFound; },