helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: scripts : improve get-wikitext-2.sh

Switch to sh, add curl fallback, and avoid redundant downloads

Changed files:
filename: scripts/get-wikitext-2.sh
patch: @@ -1,11 +1,43 @@
-#!/usr/bin/env bash
+#!/bin/sh
+# vim: set ts=4 sw=4 et:
 
-wget https://huggingface.co/datasets/ggml-org/ci/resolve/main/wikitext-2-raw-v1.zip
-unzip wikitext-2-raw-v1.zip
+ZIP="wikitext-2-raw-v1.zip"
+FILE="wikitext-2-raw/wiki.test.raw"
+URL="https://huggingface.co/datasets/ggml-org/ci/resolve/main/$ZIP"
 
-echo "Usage:"
-echo ""
-echo "  ./llama-perplexity -m model.gguf -f wikitext-2-raw/wiki.test.raw [other params]"
-echo ""
+die() {
+    printf "%s\n" "$@" >&2
+    exit 1
+}
 
-exit 0
+have_cmd() {
+    for cmd; do
+        command -v "$cmd" >/dev/null || return
+    done
+}
+
+dl() {
+    [ -f "$2" ] && return
+    if have_cmd wget; then
+        wget "$1" -O "$2"
+    elif have_cmd curl; then
+        curl -L "$1" -o "$2"
+    else
+        die "Please install wget or curl"
+    fi
+}
+
+have_cmd unzip || die "Please install unzip"
+
+if [ ! -f "$FILE" ]; then
+    dl "$URL" "$ZIP" || exit
+    unzip -o "$ZIP"  || exit
+    rm -f -- "$ZIP"
+fi
+
+cat <<EOF
+Usage:
+
+  llama-perplexity -m model.gguf -f $FILE [other params]
+
+EOF
Repository: ollama/ollama
Pull request: OpenAI: accept additional headers to fix CORS error #8342

Related to #8342, I add some optional header for openai npm package.






Changed files:
filename: server/routes.go
patch: @@ -1131,7 +1131,7 @@ func (s *Server) GenerateRoutes() http.Handler {
 	config.AllowWildcard = true
 	config.AllowBrowserExtensions = true
 	config.AllowHeaders = []string{"Authorization", "Content-Type", "User-Agent", "Accept", "X-Requested-With"}
-	openAIProperties := []string{"lang", "package-version", "os", "arch", "retry-count", "runtime", "runtime-version", "async"}
+	openAIProperties := []string{"lang", "package-version", "os", "arch", "retry-count", "runtime", "runtime-version", "async", "helper-method", "poll-helper", "custom-poll-interval"}
 	for _, prop := range openAIProperties {
 		config.AllowHeaders = append(config.AllowHeaders, "x-stainless-"+prop)
 	}
Repository: huggingface/transformers
Pull request: [Quantization] Misc tests fixes

# What does this PR do?

Fixing various Quantization tests

Changed files:
filename: src/transformers/conversion_mapping.py
patch: @@ -142,12 +142,12 @@ def _build_checkpoint_conversion_mapping():
     if hasattr(torch.nn.utils.parametrizations, "weight_norm"):
         mapping["legacy"] += [
             WeightRenaming(
-                source_patterns="weight_g",
-                target_patterns="parametrizations.weight.original0",
+                source_patterns=".weight_g$",
+                target_patterns=".parametrizations.weight.original0",
             ),
             WeightRenaming(
-                source_patterns="weight_v",
-                target_patterns="parametrizations.weight.original1",
+                source_patterns=".weight_v$",
+                target_patterns=".parametrizations.weight.original1",
             ),
         ]
     else:

filename: src/transformers/core_model_loading.py
patch: @@ -302,6 +302,8 @@ def __post_init__(self):
         for i, pattern in enumerate(self.target_patterns):
             # Some mapping contains `^` to notify start of string when matching -> remove it during reverse mapping
             pattern = pattern.removeprefix("^")
+            # Some mapping contains `$` to notify end of string when matching -> remove it during reverse mapping
+            pattern = pattern.removesuffix("$")
             # Remove negative lookahead if any. This is ugly but needed for reverse mapping of Qwen2.5 and Sam3!
             pattern = re.sub(r"\(\?!.+\)", "", pattern)
             # Allow capturing groups in patterns, i.e. to add/remove a prefix to all keys (e.g. timm_wrapper, sam3)

filename: tests/quantization/gptq/test_gptq.py
patch: @@ -70,6 +70,7 @@ def test_from_dict(self):
         self.assertEqual(dict["bits"], quantization_config.bits)
 
     @require_optimum
+    @require_gptqmodel
     def test_optimum_config(self):
         from optimum.gptq import GPTQQuantizer
 

filename: tests/quantization/mxfp4/test_mxfp4.py
patch: @@ -225,21 +225,6 @@ def test_quantizer_validation_missing_triton_pre_quantized_no_dequantize(self):
             quantizer.validate_environment()
             self.assertTrue(quantizer.quantization_config.dequantize)
 
-    def test_update_dtype(self):
-        """Test torch dtype updating"""
-        from transformers.quantizers.quantizer_mxfp4 import Mxfp4HfQuantizer
-
-        config = Mxfp4Config()
-        quantizer = Mxfp4HfQuantizer(config)
-
-        # Should default to bfloat16
-        result_dtype = quantizer.update_dtype(None)
-        self.assertEqual(result_dtype, torch.bfloat16)
-
-        # Should preserve existing dtype
-        result_dtype = quantizer.update_dtype(torch.float32)
-        self.assertEqual(result_dtype, torch.float32)
-
     def test_get_param_name_dequantize(self):
         """Test parameter name updating when dequantizing"""
         from transformers.quantizers.quantizer_mxfp4 import Mxfp4HfQuantizer
Repository: ollama/ollama
Pull request: readme: add phi4 model

readme: add phi4 model

Changed files:
filename: README.md
patch: @@ -58,8 +58,8 @@ Here are some example models that can be downloaded:
 | Llama 3.2 Vision   | 90B        | 55GB  | `ollama run llama3.2-vision:90b` |
 | Llama 3.1          | 8B         | 4.7GB | `ollama run llama3.1`            |
 | Llama 3.1          | 405B       | 231GB | `ollama run llama3.1:405b`       |
+| Phi 4              | 14B        | 9.1GB | `ollama run phi4`                |
 | Phi 3 Mini         | 3.8B       | 2.3GB | `ollama run phi3`                |
-| Phi 3 Medium       | 14B        | 7.9GB | `ollama run phi3:medium`         |
 | Gemma 2            | 2B         | 1.6GB | `ollama run gemma2:2b`           |
 | Gemma 2            | 9B         | 5.5GB | `ollama run gemma2`              |
 | Gemma 2            | 27B        | 16GB  | `ollama run gemma2:27b`          |
Repository: nodejs/node
Pull request: meta: move one or more collaborators to emeritus

This PR was generated by the [`find-inactive-collaborators.yml` workflow](https://github.com/nodejs/node/blob/main/.github/workflows/find-inactive-collaborators.yml).

@nodejs/tsc Please follow up with the [offboarding tasks](https://github.com/nodejs/node/blob/main/doc/contributing/offboarding.md).

Changed files:
filename: README.md
patch: @@ -379,8 +379,6 @@ For information about the governance of the Node.js project, see
   **Jordan Harband** <<ljharb@gmail.com>>
 * [lpinca](https://github.com/lpinca) -
   **Luigi Pinca** <<luigipinca@gmail.com>> (he/him)
-* [lukekarrys](https://github.com/lukekarrys) -
-  **Luke Karrys** <<luke@lukekarrys.com>> (he/him)
 * [Lxxyx](https://github.com/Lxxyx) -
   **Zijian Liu** <<lxxyxzj@gmail.com>> (he/him)
 * [marco-ippolito](https://github.com/marco-ippolito) -
@@ -593,6 +591,8 @@ For information about the governance of the Node.js project, see
   **Nitzan Uziely** <<linkgoron@gmail.com>>
 * [lucamaraschi](https://github.com/lucamaraschi) -
   **Luca Maraschi** <<luca.maraschi@gmail.com>> (he/him)
+* [lukekarrys](https://github.com/lukekarrys) -
+  **Luke Karrys** <<luke@lukekarrys.com>> (he/him)
 * [lundibundi](https://github.com/lundibundi) -
   **Denys Otrishko** <<shishugi@gmail.com>> (he/him)
 * [lxe](https://github.com/lxe) -
Repository: facebook/react
Pull request: [ci] Reduce non-deterministic builds for eslint-plugin-react-hooks

See https://github.com/rollup/plugins/issues/1425

Currently, `@babel/helper-string-parser/lib/index.js` is either emitted as a wrapped esmodule or inline depending on the ordering of async functions in `rollup/commonjs`. Specifically, `@babel/types/lib/definitions/core.js` is cyclic (i.e. transitively depends upon itself), but sometimes `@babel/helper-string-parser/lib/index.js` is emitted before this is realized.


A relatively straightforward patch is to wrap all modules (see https://github.com/rollup/plugins/issues/1425#issuecomment-1465626736). This only regresses `eslint-plugin-react-hooks` bundle size by ~1.8% and is safer (see https://github.com/rollup/plugins/blob/master/packages/commonjs/README.md#strictrequires)

> The default value of true will wrap all CommonJS files in functions which are executed when they are required for the first time, preserving NodeJS semantics. This is the safest setting and should be used if the generated code does not work correctly with "auto". Note that strictRequires: true can have a small impact on the size and performance of generated code, but less so if the code is minified.

(note that we're on an earlier version of `@rollup/commonjs` which does not default to `strictRequires: true`)


Changed files:
filename: scripts/rollup/build.js
patch: @@ -393,7 +393,8 @@ function getPlugins(
               };
             },
           },
-      bundle.tsconfig != null ? commonjs() : false,
+      // See https://github.com/rollup/plugins/issues/1425
+      bundle.tsconfig != null ? commonjs({strictRequires: true}) : false,
       // Shim any modules that need forking in this environment.
       useForks(forks),
       // Ensure we don't try to bundle any fbjs modules.
Repository: ollama/ollama
Pull request: Add CUSTOM_CPU_FLAGS to Dockerfile.

Allow docker images to be built with custom flags.

Fixes: #7622

Changed files:
filename: Dockerfile
patch: @@ -67,6 +67,7 @@ ARG OLLAMA_SKIP_CUDA_GENERATE
 ARG OLLAMA_SKIP_ROCM_GENERATE
 ARG OLLAMA_FAST_BUILD
 ARG VERSION
+ARG CUSTOM_CPU_FLAGS
 RUN --mount=type=cache,target=/root/.ccache \
     if grep "^flags" /proc/cpuinfo|grep avx>/dev/null; then \
         make -j $(nproc) dist ; \
Repository: electron/electron
Pull request: fix: destroy url loader wrapper when JS env exits

Backport of #44574

See that PR for details.


Notes: fix crash in net api when utility process exits.

Changed files:
filename: shell/common/api/electron_api_url_loader.cc
patch: @@ -380,13 +380,13 @@ void SimpleURLLoaderWrapper::Start() {
   loader_->SetAllowHttpErrorResults(true);
   loader_->SetURLLoaderFactoryOptions(request_options_);
   loader_->SetOnResponseStartedCallback(base::BindOnce(
-      &SimpleURLLoaderWrapper::OnResponseStarted, base::Unretained(this)));
+      &SimpleURLLoaderWrapper::OnResponseStarted, weak_factory_.GetWeakPtr()));
   loader_->SetOnRedirectCallback(base::BindRepeating(
-      &SimpleURLLoaderWrapper::OnRedirect, base::Unretained(this)));
+      &SimpleURLLoaderWrapper::OnRedirect, weak_factory_.GetWeakPtr()));
   loader_->SetOnUploadProgressCallback(base::BindRepeating(
-      &SimpleURLLoaderWrapper::OnUploadProgress, base::Unretained(this)));
+      &SimpleURLLoaderWrapper::OnUploadProgress, weak_factory_.GetWeakPtr()));
   loader_->SetOnDownloadProgressCallback(base::BindRepeating(
-      &SimpleURLLoaderWrapper::OnDownloadProgress, base::Unretained(this)));
+      &SimpleURLLoaderWrapper::OnDownloadProgress, weak_factory_.GetWeakPtr()));
 
   url_loader_factory_ = GetURLLoaderFactoryForURL(request_ref->url);
   loader_->DownloadAsStream(url_loader_factory_.get(), this);
@@ -718,14 +718,19 @@ void SimpleURLLoaderWrapper::OnDataReceived(std::string_view string_view,
 }
 
 void SimpleURLLoaderWrapper::OnComplete(bool success) {
+  auto self = weak_factory_.GetWeakPtr();
   if (success) {
     Emit("complete");
   } else {
     Emit("error", net::ErrorToString(loader_->NetError()));
   }
-  loader_.reset();
-  pinned_wrapper_.Reset();
-  pinned_chunk_pipe_getter_.Reset();
+  // If users initiate process shutdown when the event is emitted, then
+  // we would perform cleanup of the wrapper and we should bail out below.
+  if (self) {
+    loader_.reset();
+    pinned_wrapper_.Reset();
+    pinned_chunk_pipe_getter_.Reset();
+  }
 }
 
 void SimpleURLLoaderWrapper::OnResponseStarted(

filename: shell/common/api/electron_api_url_loader.h
patch: @@ -21,6 +21,7 @@
 #include "services/network/public/mojom/url_loader_network_service_observer.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
 #include "shell/browser/event_emitter_mixin.h"
+#include "shell/common/gin_helper/cleaned_up_at_exit.h"
 #include "url/gurl.h"
 #include "v8/include/v8-forward.h"
 
@@ -50,6 +51,7 @@ namespace electron::api {
 class SimpleURLLoaderWrapper final
     : public gin::Wrappable<SimpleURLLoaderWrapper>,
       public gin_helper::EventEmitterMixin<SimpleURLLoaderWrapper>,
+      public gin_helper::CleanedUpAtExit,
       private network::SimpleURLLoaderStreamConsumer,
       private network::mojom::URLLoaderNetworkServiceObserver {
  public:
Repository: huggingface/transformers
Pull request: [`CI`] Add to run slow

As per title

Changed files:
filename: .github/workflows/self-comment-ci.yml
patch: @@ -27,7 +27,7 @@ env:
 jobs:
   get-pr-number:
     name: Get PR number
-    if: ${{ github.event.issue.state == 'open' && contains(fromJSON('["ydshieh", "ArthurZucker", "zucchini-nlp", "molbap", "gante", "LysandreJik", "Cyrilvallez", "Rocketknight1", "SunMarc", "eustlb", "MekkCyber", "vasqu", "ivarflakstad", "stevhliu", "ebezzam", "remi-or", "itazap"]'), github.actor) && (startsWith(github.event.comment.body, 'run-slow') || startsWith(github.event.comment.body, 'run slow') || startsWith(github.event.comment.body, 'run_slow')) }}
+    if: ${{ github.event.issue.state == 'open' && contains(fromJSON('["ydshieh", "ArthurZucker", "zucchini-nlp", "molbap", "gante", "LysandreJik", "Cyrilvallez", "Rocketknight1", "SunMarc", "eustlb", "MekkCyber", "vasqu", "ivarflakstad", "stevhliu", "ebezzam", "remi-or", "itazap", "3outeille"]'), github.actor) && (startsWith(github.event.comment.body, 'run-slow') || startsWith(github.event.comment.body, 'run slow') || startsWith(github.event.comment.body, 'run_slow')) }}
     uses: ./.github/workflows/get-pr-number.yml
 
   get-pr-info:
Repository: ggml-org/llama.cpp
Pull request: build : fix llama.pc

This PR fixes the directory where the `llama.pc` is installed and make sure that the correct `lib` directory is used.


Changed files:
filename: CMakeLists.txt
patch: @@ -233,4 +233,4 @@ configure_file(cmake/llama.pc.in
         @ONLY)
 
 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/llama.pc"
-        DESTINATION lib/pkgconfig)
+        DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

filename: cmake/llama.pc.in
patch: @@ -1,10 +1,10 @@
 prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
 
 Name: llama
 Description: Port of Facebook's LLaMA model in C/C++
-Version: @PROJECT_VERSION@
-Libs: -L${libdir} -lggml  -lggml-base -lllama
+Version: @LLAMA_INSTALL_VERSION@
+Libs: -L${libdir} -lggml -lggml-base -lllama
 Cflags: -I${includedir}
Repository: vuejs/vue
Pull request: fix(weex): send createFinish signal after root component mounted

**What kind of change does this PR introduce?**

- [x] Bugfix

**Does this PR introduce a breaking change?**

- [x] No

**Other information:**

Make sure the timing of sending the "createFinish" signal is more reasonable, even if using asynchronous rendering (Call `new Vue()` in Promise or timer).


Changed files:
filename: src/platforms/weex/entry-framework.js
patch: @@ -61,12 +61,8 @@ export function createInstance (
   }, timerAPIs, env.services)
 
   appCode = `(function(global){ \n${appCode}\n })(Object.create(this))`
-
   callFunction(instanceVars, appCode)
 
-  // Send `createFinish` signal to native.
-  document.taskCenter.send('dom', { action: 'createFinish' }, [])
-
   return instance
 }
 
@@ -208,6 +204,16 @@ function createVueModuleInstance (instanceId, weex) {
         // record instance by id
         instance.app = this
       }
+    },
+    mounted () {
+      const options = this.$options
+      // root component (vm)
+      if (options.el && weex.document) {
+        try {
+          // Send "createFinish" signal to native.
+          weex.document.taskCenter.send('dom', { action: 'createFinish' }, [])
+        } catch (e) {}
+      }
     }
   })
Repository: ollama/ollama
Pull request: fix: correct endpoint URL to avoid 404 error


Changed files:
filename: llama/runner/README.md
patch: @@ -17,5 +17,5 @@ curl -X POST -H "Content-Type: application/json" -d '{"prompt": "hi"}' http://lo
 ### Embeddings
 
 ```
-curl -X POST -H "Content-Type: application/json" -d '{"prompt": "turn me into an embedding"}' http://localhost:8080/embeddings
+curl -X POST -H "Content-Type: application/json" -d '{"prompt": "turn me into an embedding"}' http://localhost:8080/embedding
 ```
Repository: nodejs/node
Pull request: doc: add File modes cross-references in fs methods

Adds cross-references to the File modes section from methods that use the `mode` parameter, improving discoverability of file permission documentation.

### Changes
- Added `[File modes][]` links in `fsPromises.open()`, `fsPromises.mkdir()`, and `fs.mkdir()` parameter documentation
- Added `[File modes]: #file-modes` link reference

### Motivation
Previously, developers using methods with `mode` parameters (like `0o666`, `0o777`) had to manually search for the File modes table. This change provides direct links to the relevant documentation.

Fixes #60280


Changed files:
filename: doc/api/fs.md
patch: @@ -1231,7 +1231,8 @@ added: v10.0.0
 * `path` {string|Buffer|URL}
 * `options` {Object|integer}
   * `recursive` {boolean} **Default:** `false`
-  * `mode` {string|integer} Not supported on Windows. **Default:** `0o777`.
+  * `mode` {string|integer} Not supported on Windows. See [File modes][]
+    for more details. **Default:** `0o777`.
 * Returns: {Promise} Upon success, fulfills with `undefined` if `recursive`
   is `false`, or the first directory path created if `recursive` is `true`.
 
@@ -1366,7 +1367,8 @@ changes:
 * `flags` {string|number} See [support of file system `flags`][].
   **Default:** `'r'`.
 * `mode` {string|integer} Sets the file mode (permission and sticky bits)
-  if the file is created. **Default:** `0o666` (readable and writable)
+  if the file is created. See [File modes][] for more details.
+  **Default:** `0o666` (readable and writable)
 * Returns: {Promise} Fulfills with a {FileHandle} object.
 
 Opens a {FileHandle}.
@@ -3454,7 +3456,8 @@ changes:
 * `path` {string|Buffer|URL}
 * `options` {Object|integer}
   * `recursive` {boolean} **Default:** `false`
-  * `mode` {string|integer} Not supported on Windows. **Default:** `0o777`.
+  * `mode` {string|integer} Not supported on Windows. See [File modes][]
+    for more details. **Default:** `0o777`.
 * `callback` {Function}
   * `err` {Error}
   * `path` {string|undefined} Present only if a directory is created with
@@ -8697,6 +8700,7 @@ the file contents.
 [Common System Errors]: errors.md#common-system-errors
 [FS constants]: #fs-constants
 [File access constants]: #file-access-constants
+[File modes]: #file-modes
 [MDN-Date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
 [MDN-Number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type
 [MSDN-Rel-Path]: https://docs.microsoft.com/en-us/windows/desktop/FileIO/naming-a-file#fully-qualified-vs-relative-paths
Repository: vercel/next.js
Pull request: Turbopack: escape colon in output names

Closes https://github.com/vercel/next.js/issues/87811

It causes problems on some filesystems, apparently.

```
Error: EINVAL: invalid argument, copyfile
'C:\plat\nf\.next\server\chunks\ssr\[externals]_node:buffer_00e2e67a._.js'
->
'C:\plat\nf\.next\standalone\.next\server\chunks\ssr\[externals]_node:buffer_00e2e67a._.js'
```

Changed files:
filename: turbopack/crates/turbopack-core/src/ident.rs
patch: @@ -223,9 +223,9 @@ impl AssetIdent {
         // For clippy -- This explicit deref is necessary
         let path = &self.path;
         let mut name = if let Some(inner) = context_path.get_path_to(path) {
-            clean_separators(inner)
+            escape_file_path(inner)
         } else {
-            clean_separators(&self.path.value_to_string().await?)
+            escape_file_path(&self.path.value_to_string().await?)
         };
         let removed_extension = name.ends_with(&*expected_extension);
         if removed_extension {
@@ -433,11 +433,42 @@ impl ValueToString for AssetIdent {
     }
 }
 
-fn clean_separators(s: &str) -> String {
-    static SEPARATOR_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"[/#?]").unwrap());
+fn escape_file_path(s: &str) -> String {
+    static SEPARATOR_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"[/#?:]").unwrap());
     SEPARATOR_REGEX.replace_all(s, "_").to_string()
 }
 
 fn clean_additional_extensions(s: &str) -> String {
     s.replace('.', "_")
 }
+
+#[cfg(test)]
+pub mod tests {
+    use turbo_rcstr::rcstr;
+    use turbo_tasks_backend::{BackendOptions, TurboTasksBackend, noop_backing_storage};
+    use turbo_tasks_fs::{FileSystem, VirtualFileSystem};
+
+    use crate::ident::AssetIdent;
+
+    #[tokio::test(flavor = "multi_thread", worker_threads = 2)]
+    async fn test_output_name_escaping() {
+        let tt = turbo_tasks::TurboTasks::new(TurboTasksBackend::new(
+            BackendOptions::default(),
+            noop_backing_storage(),
+        ));
+        tt.run_once(async move {
+            let fs = VirtualFileSystem::new_with_name(rcstr!("test"));
+            let root = fs.root().owned().await?;
+
+            let asset_ident = AssetIdent::from_path(root.join("a:b?c#d.js")?);
+            let output_name = asset_ident
+                .output_name(root.clone(), Some(rcstr!("prefix")), rcstr!(".js"))
+                .await?;
+            assert_eq!(&*output_name, "prefix-a_b_c_d.js");
+
+            Ok(())
+        })
+        .await
+        .unwrap();
+    }
+}
Repository: electron/electron
Pull request: build: gate brew commands in free-space-macos action

The brew uninstall and autoremove commands now only run if brew is available on the machine. This prevents failures on runners where Homebrew is not installed (such as the intel mac runner which we don't use but do track free space on for science)

_Written by Claude and reviewed by @MarshallOfSound before opening PR_

Notes: none

Changed files:
filename: .github/actions/free-space-macos/action.yml
patch: @@ -80,8 +80,10 @@ runs:
         sudo rm -rf /Users/runner/.rustup
 
         # remove homebrew packages we don't need
-        brew uninstall -f --zap aws-sam-cli session-manager-plugin gcc gcc@13 gcc@14 llvm@18 gradle maven ant azure-cli
-        brew autoremove
+        if command -v brew &> /dev/null; then
+          brew uninstall -f --zap aws-sam-cli session-manager-plugin gcc gcc@13 gcc@14 llvm@18 gradle maven ant azure-cli
+          brew autoremove
+        fi
 
         # lipo off some huge binaries arm64 versions to save space
         strip_universal_deep $(xcode-select -p)/../SharedFrameworks