在 bash 中使用 Allure Report 命令时,需要先安装 Allure 命令行工具和 allure-commandline 工具。安装完成后,在终端中输入 allure 并按回车键,检查 Allure 是否在系统中正确地设置。如果 Allure 设置正确但仍然无法在 bash 中使用 allure 命令,则需要将 allure 命令添加到系统的 PATH 环境变量中。可以通过以下代码示例来实现:
sudo nano /etc/profile export PATH=$PATH:/path/to/allure/bin source /etc/profile
在代码示例中,将 /path/to/allure/bin 替换为 Allure 命令行工具的路径。请注意,使用 sudo nano /etc/profile 命令要求管理员权限,需要相应授权。完成后,关闭终端并重新打开它,然后尝试在 bash 中使用 allure 命令,应该可以正常执行了。