Skip to content

Commit c0273ea

Browse files
committed
<chromium> Cherry-pick https://codereview.chromium.org/137433002 from upstream
This fixes the build with a cross compiler toolchain. We do not require the functionality of this script but gyp tries to run it and fails if the specified file does not exist. As the upstream issue mentions, this script is "going away soonish", until then we can keep this patch around. Reviewed-by: Pierre Rossi <[email protected]> Change-Id: I5de88fcaf750bad4eec2d72a134a86f75a30453e Reviewed-by: Zeno Albisser <[email protected]>
1 parent e45e2af commit c0273ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

chromium/build/linux/python_arch.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
#
1212

1313
file_out=$(file --dereference "$1")
14-
if [ $? -ne 0 ]; then
14+
# The POSIX spec says that `file` should not exit(1) if the file does not
15+
# exist, so do our own -e check to catch things.
16+
if [ $? -ne 0 ] || [ ! -e "$1" ] ; then
1517
echo unknown
1618
exit 0
1719
fi

0 commit comments

Comments
 (0)