Unverified Commit 433265fa authored by Felipe Franciosi's avatar Felipe Franciosi Committed by GitHub
Browse files

fix: Avoid pipe to head on find (#751)

parent ddd38dcd
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -113,5 +113,4 @@ jobs:
          subject: Build of ${{ github.event.repository.name }} v${{ steps.meta.outputs.version }} completed
          body: |
              The build job of ${{ github.event.repository.name }} v${{ steps.meta.outputs.version }} was completed successfully!
              
              See https://github.com/${{ github.repository }}/actions for more information.
+5 −5
Original line number Diff line number Diff line
@@ -203,8 +203,8 @@ findFile() {
  local ext="$1"
  local fname="boot.$ext"

  dir=$(find / -maxdepth 1 -type d -iname "$fname" | head -n 1)
  [ ! -d "$dir" ] && dir=$(find "$STORAGE" -maxdepth 1 -type d -iname "$fname" | head -n 1)
  dir=$(find / -maxdepth 1 -type d -iname "$fname" -print -quit)
  [ ! -d "$dir" ] && dir=$(find "$STORAGE" -maxdepth 1 -type d -iname "$fname" -print -quit)

  if [ -d "$dir" ]; then
    if hasDisk; then
@@ -213,8 +213,8 @@ findFile() {
    error "The bind $dir maps to a file that does not exist!" && exit 37
  fi

  file=$(find / -maxdepth 1 -type f -iname "$fname" | head -n 1)
  [ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname "$fname" | head -n 1)
  file=$(find / -maxdepth 1 -type f -iname "$fname" -print -quit)
  [ ! -s "$file" ] && file=$(find "$STORAGE" -maxdepth 1 -type f -iname "$fname" -print -quit)

  detectType "$file" && return 0

+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+17 −17

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+4 −4

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

Loading