From 156e4834913600b83c4e065c828d59f0f0bef601 Mon Sep 17 00:00:00 2001 From: cpojer Date: Tue, 19 Mar 2019 08:45:36 -0700 Subject: [PATCH] Remove `-p` calls from `shasum`. (#24036) Summary: Fixes #22873. Given that this code is meant to only work on macOS, we should be fine not using a portable hash. In the packages for which this matters at the bottom of this file, it produces the same hashes so it should be fine. [General] [Fixed] - Don't use `-p` when invoking shasum. Pull Request resolved: https://github.com/facebook/react-native/pull/24036 Differential Revision: D14521134 Pulled By: cpojer fbshipit-source-id: 882e762b7817d9d46bdd405c9e2e9e8b4d7cfaf4 --- scripts/ios-install-third-party.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ios-install-third-party.sh b/scripts/ios-install-third-party.sh index 1cd1cd20c89e46..4b64c70c23657b 100755 --- a/scripts/ios-install-third-party.sh +++ b/scripts/ios-install-third-party.sh @@ -32,12 +32,12 @@ function fetch_and_unpack () { while true; do if [ -f "$cachedir/$file" ]; then - if shasum -p "$cachedir/$file" | + if shasum "$cachedir/$file" | awk -v hash="$hash" '{exit $1 != hash}'; then break else echo "Incorrect hash:" 2>&1 - shasum -p "$cachedir/$file" 2>&1 + shasum "$cachedir/$file" 2>&1 echo "Retrying..." 2>&1 fi fi