WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 24, 2025

The installer script fails on MinGW/MinTTY with a 404 error because uname returns MINGW64_NT-10.0-19045 (or similar), which the script doesn't recognize. It attempts to download a non-existent croc_v10.3.1_MINGW64_NT-10.0-19045-64bit.tar.gz instead of the Windows binary.

Changes

  • Map MINGW* OS strings to Windows in the OS detection case statement
  • Set download extension to zip for MinGW environments
case "${croc_os}" in
   "Darwin" ) croc_os="macOS";;
  *"BusyBox"* ) croc_os="Linux";;
  "MINGW"* ) croc_os="Windows";
              croc_dl_ext="zip";;
  "CYGWIN"* ) croc_os="Windows";
              croc_dl_ext="zip";
              print_message "== Cygwin is currently unsupported." "error";
              exit 1;;
esac

MinGW users can now install using curl https://getcroc.schollz.com | bash, which will correctly download croc_v10.3.1_Windows-64bit.zip.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/schollz/croc/releases/tags/v10.3.1
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[Enchancement]: Add MinGW Support (don't know how to unassign "bug" label)</issue_title>
<issue_description>### What happened?

The OS is detected as MINGW64_NT-10.0-19045, and tries to download croc_v10.3.1_MINGW64_NT-10.0-19045-64bit.tar.gz from releases, which simply doesn't exist and download fails.

What did you expect to happen?

The script should account for being in MINTTY, and download the windows file and follow windows installation instructions.

Steps to reproduce

  1. Install MINGW
  2. Launch MinTTY (MINGW64 bash terminal)
  3. Run curl https://getcroc.schollz.com | bash

croc version

None

Operating System

Windows

OS Version

Windows 10 64bit

Relevant log output

NAME@DESKTOP-LETTERS MINGW64 /c/Windows/system32
$curl https://getcroc.schollz.com | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 25645  100 25645    0     0   8236      0  0:00:03  0:00:03 --:--:--  8240
=================================================
              ____
             / ___|_ __ ___   ___
            | |   | '__/ _ \ / __|
            | |___| | | (_) | (__
             \____|_|  \___/ \___|

       ___           _        _ _
      |_ _|_ __  ___| |_ __ _| | | ___ _ __
       | || '_ \/ __| __/ _` | | |/ _ \ '__|
       | || | | \__ \ || (_| | | |  __/ |
      |___|_| |_|___/\__\__,_|_|_|\___|_|
==================================================
== Install prefix set to /usr/local/bin
== Created temp dir at /tmp/croc.dYC6Y1
== Architecture detected as x86_64
== OS detected as MINGW64_NT-10.0-19045
https://github.com/schollz/croc/releases/download/v10.3.1/croc_v10.3.1_MINGW64_NT-10.0-19045-64bit.tar.gz /tmp/croc.dYC6Y1 croc_v10.3.1_MINGW64_NT-10.0-19045-64bit.tar.gz
curl: (22) The requested URL returned error: 404
== Return code of download tool returned an unexpected value of 22

Additional context

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Nov 24, 2025
Copilot AI changed the title [WIP] Add MinGW support for file downloads Add MinGW support to installer script Nov 24, 2025
Copilot AI requested a review from schollz November 24, 2025 02:36
Copilot finished work on behalf of schollz November 24, 2025 02:36
@schollz schollz marked this pull request as ready for review November 24, 2025 02:47
@schollz schollz merged commit 0d173e9 into main Nov 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enchancement]: Add MinGW Support (don't know how to unassign "bug" label)

2 participants