From 245c93785a8059eeccbe31ee6441e5d276d0812d Mon Sep 17 00:00:00 2001 From: Adam Blazczak Date: Sun, 1 Sep 2024 10:40:23 -0700 Subject: [PATCH] Fix SyntaxError introduced by a refactor in bc0f5ee $ brew update ==> Updating Homebrew... To restore the stashed changes to /usr/local/Homebrew, run: cd /usr/local/Homebrew && git stash pop File "", line 1 import fcntl; fcntl.flock(, fcntl.LOCK_EX | fcntl.LOCK_NB) ^ SyntaxError: invalid syntax Introduced on May 2, 2024 with https://github.com/Homebrew/brew/commit/bc0f5ee62a9f410d81d9a8820083a387a82573f7 --- Library/Homebrew/utils/lock.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/utils/lock.sh b/Library/Homebrew/utils/lock.sh index 49ccaa1120b2f..db8d60e1a3586 100644 --- a/Library/Homebrew/utils/lock.sh +++ b/Library/Homebrew/utils/lock.sh @@ -64,7 +64,7 @@ _create_lock() { flock -n "${lock_file_descriptor}" elif [[ -x "${python}" ]] then - "${python}" -c "import fcntl; fcntl.flock(${lock_fd}, fcntl.LOCK_EX | fcntl.LOCK_NB)" + "${python}" -c "import fcntl; fcntl.flock(${lock_file_descriptor}, fcntl.LOCK_EX | fcntl.LOCK_NB)" else onoe "Cannot create \`brew ${command_name_and_args}\` lock due to missing/too old ruby/flock/python, please avoid running Homebrew in parallel." fi