Compare commits

..

1 Commits

Author SHA1 Message Date
Geoff Bourne 2fc873c01b Handle non-specific file types in start-utils extraction logic
Also:
- assume zip type based on file extension when applicable
2026-06-22 10:59:28 -05:00
2 changed files with 24 additions and 6 deletions
+12 -5
View File
@@ -1,5 +1,4 @@
name: Sponsor Labeler name: Label Sponsor Contributions
on: on:
issues: issues:
types: types:
@@ -10,7 +9,15 @@ on:
jobs: jobs:
label-sponsor: label-sponsor:
uses: itzg/github-workflows/.github/workflows/sponsor-labeler.yml@main runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
steps:
- name: Check if sponsor
uses: JasonEtco/is-sponsor-label-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
author: ${{ github.event.issue.user.login || github.event.pull_request.user.login }} label: sponsor
number: ${{ github.event.issue.number || github.event.pull_request.number }}
+11
View File
@@ -560,6 +560,17 @@ function extract() {
# remaining args are paths within the archive to extract; if none, extract everything # remaining args are paths within the archive to extract; if none, extract everything
type=$(file -b --mime-type "${src}") type=$(file -b --mime-type "${src}")
if [[ "$type" == application/octet-stream ]]; then
logWarning "Detected non-specific file type $type for $src"
case "$src" in
*.zip)
log "Assuming zip from extension"
type=application/zip
;;
# otherwise fall through to
esac
fi
case "${type}" in case "${type}" in
application/zip) application/zip)
unzip -o -q -d "${destDir}" "${src}" "$@" unzip -o -q -d "${destDir}" "${src}" "$@"