helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: `app.accessibilitySupportEnabled` 

Backport of #48041

See that PR for details.


Notes: Fixed an issue where `app.accessibilitySupportEnabled` didn't work as expected. 

Changed files:
filename: shell/browser/api/electron_api_app.cc
patch: @@ -1158,7 +1158,8 @@ void App::DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower) {
 
 bool App::IsAccessibilitySupportEnabled() {
   auto* ax_state = content::BrowserAccessibilityState::GetInstance();
-  return ax_state->GetAccessibilityMode() == ui::kAXModeComplete;
+  auto mode = ax_state->GetAccessibilityMode();
+  return mode.has_mode(ui::kAXModeComplete.flags());
 }
 
 void App::SetAccessibilitySupportEnabled(gin_helper::ErrorThrower thrower,
Repository: ggml-org/llama.cpp
Pull request: Corrected: In ggml_cuda_mul_mat_q(), s13 is declared incorrectly to nb[2] instead of nb[3]

In  ggml_cuda_mul_mat_q(), when in the MoE path and when quantizing src1, s13 is incorrectly declared to nb[2] instead of nb[3].

Earlier in the function:
    const int64_t s03 = src0->nb[3] / ts_src0;
    const int64_t s3  =  dst->nb[3] / ts_dst;
    ...
    
  if (!ids) {
     ...
        {
            const int64_t s11 = src1->nb[1] / ts_src1;
            const int64_t s12 = src1->nb[2] / ts_src1;
            const int64_t s13 = src1->nb[3] / ts_src1;
       }
     Later, in the ids path:
        const int64_t s11 = src1->nb[1] / ts_src1;
        const int64_t s12 = src1->nb[2] / ts_src1;
        const int64_t s13 = src1->**nb[2]** / ts_src1;     _<--- [2] here, repeated, should be [3]._

ne13 is currently asserted to 1 , so this very likely doesn't affect anything yet, but it should still be fixed for correctness.
     
  Copilot summary:
This pull request fixes an indexing bug in the `ggml_cuda_mul_mat_q` function in `mmq.cu`. The change corrects the calculation of the `s13` variable to use the correct dimension of the `src1` tensor, which improves the accuracy of subsequent operations.

* Bug fix:
  * Corrected the calculation of `s13` to use `src1->nb[3]` instead of `src1->nb[2]`, ensuring the correct tensor dimension is used in matrix multiplication operations.

Changed files:
filename: ggml/src/ggml-cuda/mmq.cu
patch: @@ -190,7 +190,7 @@ void ggml_cuda_mul_mat_q(
     {
         const int64_t s11 = src1->nb[1] / ts_src1;
         const int64_t s12 = src1->nb[2] / ts_src1;
-        const int64_t s13 = src1->nb[2] / ts_src1;
+        const int64_t s13 = src1->nb[3] / ts_src1;
 
         if (use_native_mxfp4) {
             quantize_mmq_mxfp4_cuda(src1_d, ids_src1.get(), src1_q8_1.get(), src0->type, ne10, s11, s12, s13,
Repository: ollama/ollama
Pull request: Add some more debugging logs for intel discovery

Also removes an unused overall count variable

Until we can find a repro to fully root cause the crash, this may help narrow the search space.

Related to #5073 

Changed files:
filename: gpu/gpu_info_oneapi.c
patch: @@ -13,7 +13,7 @@ void oneapi_init(char *oneapi_lib_path, oneapi_init_resp_t *resp) {
   resp->oh.num_drivers = 0;
   const int buflen = 256;
   char buf[buflen + 1];
-  int i, d, count;
+  int i, d;
   struct lookup {
     char *s;
     void **p;
@@ -62,6 +62,8 @@ void oneapi_init(char *oneapi_lib_path, oneapi_init_resp_t *resp) {
     }
   }
 
+  LOG(resp->oh.verbose, "calling zesInit\n");
+
   ret = (*resp->oh.zesInit)(0);
   if (ret != ZE_RESULT_SUCCESS) {
     LOG(resp->oh.verbose, "zesInit err: %x\n", ret);
@@ -71,7 +73,7 @@ void oneapi_init(char *oneapi_lib_path, oneapi_init_resp_t *resp) {
     return;
   }
 
-  count = 0;
+  LOG(resp->oh.verbose, "calling zesDriverGet\n");
   ret = (*resp->oh.zesDriverGet)(&resp->oh.num_drivers, NULL);
   if (ret != ZE_RESULT_SUCCESS) {
     LOG(resp->oh.verbose, "zesDriverGet err: %x\n", ret);
@@ -96,6 +98,7 @@ void oneapi_init(char *oneapi_lib_path, oneapi_init_resp_t *resp) {
   }
 
   for (d = 0; d < resp->oh.num_drivers; d++) {
+    LOG(resp->oh.verbose, "calling zesDeviceGet %d\n", resp->oh.drivers[d]);
     ret = (*resp->oh.zesDeviceGet)(resp->oh.drivers[d],
                                    &resp->oh.num_devices[d], NULL);
     if (ret != ZE_RESULT_SUCCESS) {
@@ -116,7 +119,6 @@ void oneapi_init(char *oneapi_lib_path, oneapi_init_resp_t *resp) {
       oneapi_release(resp->oh);
       return;
     }
-    count += resp->oh.num_devices[d];
   }
 
   return;
Repository: nodejs/node
Pull request: http: improve writeEarlyHints by avoiding for-of loop

This change is based on the "Unsafe array iteration" principle from the Node.js core development guidelines. for-of loops rely on the Symbol.iterator property, which can be modified by userland code, potentially leading to unpredictable or insecure behavior. Using a standard for loop directly accesses the array elements by index, ensuring a more stable and secure execution flow.

Refs: https://github.com/nodejs/node/blob/main/doc/contributing/primordials.md#unsafe-array-iteration
<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: lib/_http_server.js
patch: @@ -331,7 +331,9 @@ ServerResponse.prototype.writeEarlyHints = function writeEarlyHints(hints, cb) {
 
   head += 'Link: ' + link + '\r\n';
 
-  for (const key of ObjectKeys(hints)) {
+  const keys = ObjectKeys(hints);
+  for (let i = 0; i < keys.length; i++) {
+    const key = keys[i];
     if (key !== 'link') {
       head += key + ': ' + hints[key] + '\r\n';
     }
Repository: ggml-org/llama.cpp
Pull request: server : use different seeds for child completions

rel #18663

I realized that we want to have different RNG seeds for the `n_cmpl` completions - otherwise we will generate the same result for each child. This makes the assert in the `test_chat_completions_multiple_choices()` test invalid.

Changed files:
filename: include/llama.h
patch: @@ -1292,7 +1292,9 @@ extern "C" {
     // available samplers:
 
     LLAMA_API struct llama_sampler * llama_sampler_init_greedy(void);
-    LLAMA_API struct llama_sampler * llama_sampler_init_dist  (uint32_t seed);
+
+    /// seed == LLAMA_DEFAULT_SEED to use a random seed.
+    LLAMA_API struct llama_sampler * llama_sampler_init_dist(uint32_t seed);
 
     /// @details Top-K sampling described in academic paper "The Curious Case of Neural Text Degeneration" https://arxiv.org/abs/1904.09751
     /// Setting k <= 0 makes this a noop

filename: src/llama-sampling.cpp
patch: @@ -2142,7 +2142,7 @@ struct llama_sampler_xtc {
     const uint32_t seed;
     uint32_t       seed_cur;
 
-    std::mt19937    rng;
+    std::mt19937   rng;
 };
 
 static const char * llama_sampler_xtc_name(const struct llama_sampler * /*smpl*/) {

filename: tools/server/server-context.cpp
patch: @@ -4,7 +4,6 @@
 #include "server-task.h"
 #include "server-queue.h"
 
-#include "arg.h"
 #include "common.h"
 #include "llama.h"
 #include "log.h"
@@ -16,7 +15,6 @@
 #include <cstddef>
 #include <cinttypes>
 #include <memory>
-#include <unordered_set>
 #include <filesystem>
 
 // fix problem with std::min and std::max
@@ -2927,9 +2925,14 @@ std::unique_ptr<server_res_generator> server_routes::handle_completions_impl(
             if (task.params.n_cmpl > 1) {
                 task.n_children = task.params.n_cmpl - 1;
                 for (size_t j = 0; j < task.n_children; j++) {
-                    server_task child = task.create_child(
-                        task.id,
-                        rd.get_new_id());
+                    server_task child = task.create_child(task.id, rd.get_new_id());
+
+                    // use different sampling seed for each child
+                    // note: https://github.com/ggml-org/llama.cpp/pull/18700#discussion_r2675115723
+                    if (child.params.sampling.seed != LLAMA_DEFAULT_SEED) {
+                        child.params.sampling.seed += j + 1;
+                    }
+
                     tasks.push_back(std::move(child));
                 }
             }

filename: tools/server/tests/unit/test_chat_completion.py
patch: @@ -503,5 +503,4 @@ def test_chat_completions_multiple_choices():
     assert len(res.body["choices"]) == 2
     for choice in res.body["choices"]:
         assert "assistant" == choice["message"]["role"]
-        assert match_regex("Suddenly", choice["message"]["content"])
         assert choice["finish_reason"] == "length"
Repository: facebook/react
Pull request: [compiler][ez] Remove unused param


Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/Optimization/ConstantPropagation.ts
patch: @@ -8,7 +8,6 @@
 import {isValidIdentifier} from '@babel/types';
 import {CompilerError} from '../CompilerError';
 import {
-  Environment,
   GotoVariant,
   HIRFunction,
   IdentifierId,
@@ -130,7 +129,7 @@ function applyConstantPropagation(
         continue;
       }
       const instr = block.instructions[i]!;
-      const value = evaluateInstruction(fn.env, constants, instr);
+      const value = evaluateInstruction(constants, instr);
       if (value !== null) {
         constants.set(instr.lvalue.identifier.id, value);
       }
@@ -223,7 +222,6 @@ function evaluatePhi(phi: Phi, constants: Constants): Constant | null {
 }
 
 function evaluateInstruction(
-  env: Environment,
   constants: Constants,
   instr: Instruction,
 ): Constant | null {
Repository: ggml-org/llama.cpp
Pull request: ggml webgpu: clamp available memory on 32-bit systems

This is mostly to support Emscripten 32-bit builds for running the WebGPU backend in the browser. In these builds, `size_t` is limited to 32 bits, which causes issues if the underlying GPU has more available memory.

@ngxson 


Changed files:
filename: ggml/src/ggml-webgpu/ggml-webgpu.cpp
patch: @@ -19,6 +19,7 @@
 
 #include <atomic>
 #include <condition_variable>
+#include <cstdint>
 #include <cstring>
 #include <iostream>
 #include <map>
@@ -1880,9 +1881,18 @@ static const char * ggml_backend_webgpu_device_get_description(ggml_backend_dev_
 
 static void ggml_backend_webgpu_device_get_memory(ggml_backend_dev_t dev, size_t * free, size_t * total) {
     ggml_backend_webgpu_device_context * ctx = static_cast<ggml_backend_webgpu_device_context *>(dev->context);
-    // TODO: what do we actually want to return here? maxBufferSize might not be the full available memory.
-    *free                                    = ctx->webgpu_ctx->limits.maxBufferSize;
-    *total                                   = ctx->webgpu_ctx->limits.maxBufferSize;
+    // TODO: for now, return maxBufferSize as both free and total memory
+    // Track https://github.com/gpuweb/gpuweb/issues/5505 for updates.
+    uint64_t max_buffer_size = ctx->webgpu_ctx->limits.maxBufferSize;
+    // If we're on a 32-bit system, clamp to UINTPTR_MAX
+#if UINTPTR_MAX < UINT64_MAX
+    uint64_t max_ptr_size = static_cast<uint64_t>(UINTPTR_MAX);
+    if (max_buffer_size > max_ptr_size) {
+        max_buffer_size = max_ptr_size;
+    }
+#endif
+    *free  = static_cast<size_t>(max_buffer_size);
+    *total = static_cast<size_t>(max_buffer_size);
 }
 
 static enum ggml_backend_dev_type ggml_backend_webgpu_device_get_type(ggml_backend_dev_t dev) {
Repository: huggingface/transformers
Pull request: update `huggingface_hub` dependency version

Now that `huggingface_hub` [v1.0](https://github.com/huggingface/huggingface_hub/releases/tag/v1.0.0) is released, Let's update the dependency to `>=1.0.0,<2.0`.

cc @Wauplin 

Changed files:
filename: setup.py
patch: @@ -113,7 +113,7 @@
     "GitPython<3.1.19",
     "hf-doc-builder>=0.3.0",
     "hf_xet",
-    "huggingface-hub==1.0.0.rc6",
+    "huggingface-hub>=1.0.0,<2.0",
     "importlib_metadata",
     "ipadic>=1.0.0,<2.0",
     "jinja2>=3.1.0",

filename: src/transformers/dependency_versions_table.py
patch: @@ -23,7 +23,7 @@
     "GitPython": "GitPython<3.1.19",
     "hf-doc-builder": "hf-doc-builder>=0.3.0",
     "hf_xet": "hf_xet",
-    "huggingface-hub": "huggingface-hub==1.0.0.rc6",
+    "huggingface-hub": "huggingface-hub>=1.0.0,<2.0",
     "importlib_metadata": "importlib_metadata",
     "ipadic": "ipadic>=1.0.0,<2.0",
     "jinja2": "jinja2>=3.1.0",
Repository: ollama/ollama
Pull request: gpu: Fix build warning

Fix build warning
```
# github.com/ollama/ollama/gpu
gpu_info_oneapi.c: In function ‘oneapi_check_vram’:
gpu_info_oneapi.c:163:51: warning: format not a string literal and no format arguments [-Wformat-security]
  163 |   snprintf(&resp->gpu_name[0], GPU_NAME_LEN, props.modelName);
      |                                              ~~~~~^~~~~~~~~~

```

Changed files:
filename: gpu/gpu_info_oneapi.c
patch: @@ -160,7 +160,7 @@ void oneapi_check_vram(oneapi_handle_t h, int driver, int device,
     return;
   }
 
-  snprintf(&resp->gpu_name[0], GPU_NAME_LEN, props.modelName);
+  snprintf(&resp->gpu_name[0], GPU_NAME_LEN, "%s", props.modelName);
 
   // TODO this needs to map to ONEAPI_DEVICE_SELECTOR syntax
   // (this is probably wrong...)
Repository: vercel/next.js
Pull request: [dev-overlay] Never dedupe errors with different names or messages

Can happen when non-error objects are logged/thrown. SpiderMonkey (FF) and JSC (Safari) don't include name and message in `.stack` so different issues would be deduped.

Closes https://linear.app/vercel/issue/NAR-376/

Changed files:
filename: packages/next/src/next-devtools/dev-overlay/shared.ts
patch: @@ -324,6 +324,9 @@ export function useErrorOverlayReducer(
     const pendingEvents = events.filter((event) => {
       // Filter out duplicate errors
       return (
+        // SpiderMonkey and JavaScriptCore don't include the error message in the stack.
+        // We don't want to dedupe errors with different messages for which we don't have a good stack
+        '' + event.error !== '' + pendingEvent.error ||
         (event.error.stack !== pendingEvent.error.stack &&
           // TODO: Let ReactDevTools control deduping instead?
           getStackIgnoringStrictMode(event.error.stack) !==
Repository: ggml-org/llama.cpp
Pull request: cmake: fix cli build when LLAMA_BUILD_SERVER=OFF

## The Problem

The problem is that building with `-DLLAMA_BUILD_SERVER=OFF` does not work, since `llama-cli` now depends on `server-context` (since #17824).

To reproduce the issue on current latest master (commit 5642667):

```sh
cmake -B build -DLLAMA_BUILD_SERVER=OFF
cmake --build build
```

It will produce the following error:

```
[ 95%] Building CXX object tools/cli/CMakeFiles/llama-cli.dir/cli.cpp.o
In file included from /home/asbjorn/Development/llama-cpp-rs/llama-cpp-sys-2/llama.cpp/tools/cli/../server/server-task.h:12,
                 from /home/asbjorn/Development/llama-cpp-rs/llama-cpp-sys-2/llama.cpp/tools/cli/../server/server-context.h:2,
                 from /home/asbjorn/Development/llama-cpp-rs/llama-cpp-sys-2/llama.cpp/tools/cli/cli.cpp:6:
/home/asbjorn/Development/llama-cpp-rs/llama-cpp-sys-2/llama.cpp/tools/cli/../server/server-common.h:7:10: fatal error: mtmd.h: No such file or directory
    7 | #include "mtmd.h"
      |          ^~~~~~~~
compilation terminated.
make[2]: *** [tools/cli/CMakeFiles/llama-cli.dir/build.make:76: tools/cli/CMakeFiles/llama-cli.dir/cli.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4013: tools/cli/CMakeFiles/llama-cli.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
```

This build error is what has prevented [utilityai/llama-cpp-rs](https://github.com/utilityai/llama-cpp-rs) from bumping the llama.cpp version for the past month.

## The Fix

~~I fixed this by moving the `if (LLAMA_BUILD_SERVER)` conditional from `tools/CMakeLists.txt` into the part of `tools/server/CMakeLists.txt` that builds the actual server executable. So now if `LLAMA_BUILD_SERVER` is `OFF`, it will still build the server shared libs (which `llama-cli` depend on), but not the server executable itself.~~

I fixed this by moving the `cli` target into the `LLAMA_BUILD_SERVER` conditional.
If `LLAMA_BUILD_TOOLS=ON` and `LLAMA_BUILD_SERVER=OFF`, it will not build cli or server, but it will build the rest.

I have run the `ci/run.sh` testing suite to confirm that everything works as before.

## AI Disclosure

The code changes in this PR were all made and verified by human hands and eyes, but LLM assistance was used for identifying the problem and suggesting several solutions (one of which is this solution).

Changed files:
filename: tools/CMakeLists.txt
patch: @@ -18,11 +18,11 @@ else()
     add_subdirectory(gguf-split)
     add_subdirectory(imatrix)
     add_subdirectory(llama-bench)
-    add_subdirectory(cli)
     add_subdirectory(completion)
     add_subdirectory(perplexity)
     add_subdirectory(quantize)
     if (LLAMA_BUILD_SERVER)
+        add_subdirectory(cli)
         add_subdirectory(server)
     endif()
     add_subdirectory(tokenize)
Repository: facebook/react
Pull request: [compiler] Fix to ref access check to ban ref?.current

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #31360



Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoRefAccesInRender.ts
patch: @@ -217,7 +217,7 @@ function joinRefAccessTypes(...types: Array<RefAccessType>): RefAccessType {
       } else if (a.kind === 'Guard') {
         if (b.kind === 'Guard' && a.refId === b.refId) {
           return a;
-        } else if (b.kind === 'Nullable') {
+        } else if (b.kind === 'Nullable' || b.kind === 'Guard') {
           return {kind: 'None'};
         } else {
           return b;
Repository: nodejs/node
Pull request: doc: remove optional title prefixes

Ref: https://github.com/nodejs/doc-kit/issues/378
Companion: https://github.com/nodejs/doc-kit/pull/449

Removes 3 outlier titles, so that stricter RegExps can be used in doc-kit.

Changed files:
filename: doc/api/buffer.md
patch: @@ -1494,7 +1494,7 @@ console.log(Buffer.isEncoding(''));
 // Prints: false
 ```
 
-### Class property: `Buffer.poolSize`
+### `Buffer.poolSize`
 
 <!-- YAML
 added: v0.11.3
@@ -5515,7 +5515,7 @@ introducing security vulnerabilities into an application.
 [`Buffer.from(arrayBuf)`]: #static-method-bufferfromarraybuffer-byteoffset-length
 [`Buffer.from(buffer)`]: #static-method-bufferfrombuffer
 [`Buffer.from(string)`]: #static-method-bufferfromstring-encoding
-[`Buffer.poolSize`]: #class-property-bufferpoolsize
+[`Buffer.poolSize`]: #bufferpoolsize
 [`ERR_INVALID_BUFFER_SIZE`]: errors.md#err_invalid_buffer_size
 [`ERR_OUT_OF_RANGE`]: errors.md#err_out_of_range
 [`JSON.stringify()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

filename: doc/api/util.md
patch: @@ -1651,7 +1651,7 @@ A MIME string is a structured string containing multiple meaningful
 components. When parsed, a `MIMEType` object is returned containing
 properties for each of these components.
 
-### Constructor: `new MIMEType(input)`
+### `new MIMEType(input)`
 
 * `input` {string} The input MIME to parse
 
@@ -1843,7 +1843,7 @@ added:
 The `MIMEParams` API provides read and write access to the parameters of a
 `MIMEType`.
 
-### Constructor: `new MIMEParams()`
+### `new MIMEParams()`
 
 Creates a new `MIMEParams` object by with empty parameters
Repository: ollama/ollama
Pull request: Rocm gfx900 workaround


Changed files:
filename: gpu/amd_linux.go
patch: @@ -333,6 +333,11 @@ func AMDGetGPUInfo() []RocmGPUInfo {
 			slog.Info("skipping rocm gfx compatibility check", "HSA_OVERRIDE_GFX_VERSION", gfxOverride)
 		}
 
+		// Check for env var workarounds
+		if name == "1002:687f" { // Vega RX 56
+			gpuInfo.EnvWorkarounds = append(gpuInfo.EnvWorkarounds, [2]string{"HSA_ENABLE_SDMA", "0"})
+		}
+
 		// The GPU has passed all the verification steps and is supported
 		resp = append(resp, gpuInfo)
 	}

filename: gpu/types.go
patch: @@ -26,6 +26,9 @@ type GpuInfo struct {
 	// Any extra PATH/LD_LIBRARY_PATH dependencies required for the Library to operate properly
 	DependencyPath string `json:"lib_path,omitempty"`
 
+	// Extra environment variables specific to the GPU as list of [key,value]
+	EnvWorkarounds [][2]string `json:"envs,omitempty"`
+
 	// GPU information
 	ID      string `json:"gpu_id"`  // string to use for selection of this specific GPU
 	Name    string `json:"name"`    // user friendly name if available

filename: llm/server.go
patch: @@ -320,6 +320,10 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
 		s.cmd.Stdout = os.Stdout
 		s.cmd.Stderr = s.status
 
+		envWorkarounds := [][2]string{}
+		for _, gpu := range gpus {
+			envWorkarounds = append(envWorkarounds, gpu.EnvWorkarounds...)
+		}
 		visibleDevicesEnv, visibleDevicesEnvVal := gpus.GetVisibleDevicesEnv()
 		pathEnvVal := strings.Join(libraryPaths, string(filepath.ListSeparator))
 
@@ -334,6 +338,12 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
 			} else if devicesNeeded && strings.EqualFold(cmp[0], visibleDevicesEnv) {
 				s.cmd.Env[i] = visibleDevicesEnv + "=" + visibleDevicesEnvVal
 				devicesNeeded = false
+			} else if len(envWorkarounds) != 0 {
+				for _, kv := range envWorkarounds {
+					if strings.EqualFold(cmp[0], kv[0]) {
+						s.cmd.Env[i] = kv[0] + "=" + kv[1]
+					}
+				}
 			}
 		}
 		if pathNeeded {