From 26d09689b9126d7f4eb35f997a592442aa1e0ed6 Mon Sep 17 00:00:00 2001
From: Philipp Stephani
Date: Sat, 17 Feb 2024 13:38:34 +0100
Subject: [PATCH] =?UTF-8?q?Revert=20"Don=E2=80=99t=20change=20the=20workin?=
=?UTF-8?q?g=20directory=20on=20Windows"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This reverts commit 3af60bab84bbfa5909f23a0b2298b0ae5c9e40ce.
This might no longer be needed.
---
elisp/process.cc | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/elisp/process.cc b/elisp/process.cc
index 8ebb0962..05201bdf 100644
--- a/elisp/process.cc
+++ b/elisp/process.cc
@@ -451,12 +451,8 @@ absl::StatusOr Run(const std::string_view binary,
final_args.insert(final_args.end(), runfiles_args.begin(),
runfiles_args.end());
final_args.insert(final_args.end(), args.begin(), args.end());
- absl::StatusOr orig_env = CopyEnv();
+ const absl::StatusOr orig_env = CopyEnv();
if (!orig_env.ok()) return orig_env.status();
- // We don’t want the Python launcher to change the current working directory,
- // otherwise relative filenames will be all messed up. See
- // https://github.com/bazelbuild/bazel/issues/7190.
- orig_env->erase(RULES_ELISP_NATIVE_LITERAL("RUN_UNDER_RUNFILES"));
map->insert(orig_env->begin(), orig_env->end());
std::vector final_env;
for (const auto& [key, value] : *map) {