Closed linonetwo closed 1 month ago
/Applications/TidGi.app/Contents/Resources/node_modules/dugite/git/libexec/git-core/git zsh: bad CPU type in executable: /Applications/TidGi.app/Contents/Resources/node_modules/dugite/git/libexec/git-core/git
Need to manually set npm_config_arch, for example
- name: Install dependencies (x64)
run: pnpm install
env:
npm_config_arch: darwin-x64
- name: Make macOS (x64)
run: pnpm run make:mac-x64
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies (arm64)
run: pnpm install dugite
env:
npm_config_arch: darwin-arm64
- name: Make macOS (arm64)
run: pnpm run make:mac-arm
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
CI: true
CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
seems Github Actions recently upgrade Apple from x86 to Mx chip, so the postinstalled git binary is for arm64.
Oh, so previously the arm64 build was buggy for me...
Also need to disable pnpm cache.
https://github.com/desktop/dugite/blob/bccae05435eac01d4da7597c9a255a3696c7439f/lib/git-process.ts#L200-L210
In electron packed.
Dev mode don't have this issue.
Electron Version: 31.1.0 Node Version: 20.14.0 Chromium Version: 126.0.6478.114 dugite": "2.7.1",