1. 问题现象
appledeMacBook-Pro:~ apple$ allure -version ERROR: JAVA_HOME is set to an invalid directory: /usr/local/opt/openjdk Please set the JAVA_HOME variable in your environment to match the location of your Java installation.
2. 处理方法
vim /usr/local/bin/allure
#!/bin/bash JAVA_HOME="/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home" exec "/usr/local/Cellar/allure/2.13.9/libexec/bin/allure" "$@"
JAVA_HOME换成自己系统安装的目录即可