Skip to content

Instantly share code, notes, and snippets.

@paulyuk
Last active June 7, 2023 03:08
Show Gist options
  • Save paulyuk/683dc466a17f5308d643d8a3dcb39ee9 to your computer and use it in GitHub Desktop.
Save paulyuk/683dc466a17f5308d643d8a3dcb39ee9 to your computer and use it in GitHub Desktop.
Install Function Core Tools (func cli) on Apple Silicon

one-time setup

set this alias, and/or insert at the end of your ~/.zshrc file

alias intel="env /usr/bin/arch -x86_64 /bin/zsh --login" 

start every development session in intel to be safe

intel
arch

output:

i386

reinstall Homebrew in intel x86 path /usr/local/bin/brew which this script will do

bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

set this alias, and/or insert at the end of your ~/.zshrc file

alias brew86='/usr/local/bin/brew'

install Functions Core Tools the normal way, but using brew86 alias

brew86 tap azure/functions
brew86 install azure-functions-core-tools@4
# if upgrading on a machine that has 2.x or 3.x installed:
brew86 link --overwrite azure-functions-core-tools@4

verify latest supported Functions CLI

func version

output:

4.0.5198

test functions, use every time

intel
arch

func init test_python --python -m V2
cd test_python

func new -t “HTTP Trigger”

python3 -m venv .venv
source .venv/bin/activate

func start

OR: Just use and follow readme of this Python v2 starter template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment