aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorSébastien Marie <semarie@online.fr>2020-10-11 08:23:37 +0000
committerSébastien Marie <semarie@online.fr>2020-10-11 08:23:37 +0000
commit97ec9fdd7929880699179f5024b8bb93ac424ee2 (patch)
treee3c1eec6dbf030a9be2dbecfb75b6a8837555fc0 /lib/std
parent78a7543056112a1df8951712a746b9adb59787af (diff)
downloadzig-97ec9fdd7929880699179f5024b8bb93ac424ee2.tar.gz
zig-97ec9fdd7929880699179f5024b8bb93ac424ee2.zip
opensd: selfExePath: do not rely on environment as it could be inherited
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/fs.zig6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/std/fs.zig b/lib/std/fs.zig
index 9c28d87e6f..5aef64afc4 100644
--- 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;
},