Unverified Commit a4ea89d6 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Extended error message

parent c451f253
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -141,12 +141,13 @@ if [ -f "$RDC" ]; then
  if [[ "$DEV" == [Nn]* ]]; then
    # Exclude dev/ from cpio extract
    { (cd "$TMP" && cpio -it < "$TMP/rd" | grep -Ev 'dev/' | while read -r entry; do cpio -idm "$entry" < "$TMP/rd" 2>/dev/null; done); rc=$?; } || :
    (( rc != 0 )) && error "Failed to extract $RDC, reason $rc" && exit 92
  else
    { (cd "$TMP" && cpio -idm <"$TMP/rd" 2>/dev/null); rc=$?; } || :
    (( rc != 0 )) && error "Failed to extract $RDC, reason $rc"
    (( rc != 0 )) && error "If the container runs unprivileged, please set DEV=N to exclude device nodes." && exit 92
  fi

  (( rc != 0 )) && error "Failed to extract $RDC, reason $rc" && exit 92

  mkdir -p /run/extract
  for file in $TMP/usr/lib/libcurl.so.4 \
              $TMP/usr/lib/libmbedcrypto.so.5 \