CI/CD管道中的Flutter命令出现问题 [英] Issue with Flutter commands from CI/CD pipelines

查看:306
本文介绍了CI/CD管道中的Flutter命令出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,最近我将Mac mini从Mojave升级到Catalina(10.15.4),以使用新的Xcode.在更新我的CI/CD管道之前,它可以正常工作.我的CI/CD管道基于Azure. (我将我的机器用作构建机器.)

更新到最新的OS版本并更新XCode之后.在运行管道时,它在"Flutter软件包获取"步骤失败,并显示以下消息## [错误] bash:"/Users/soap/documents/flutter/bin/flutter:不允许的操作"

但是当我在计算机上本地运行(导航到我的build agent文件夹并运行这些命令)时,它就可以正常工作.

注意:

  • 我已将完整磁盘"权限授予终端.
  • 授予所有文件夹R-W-X权限.

请帮帮我.

解决方案

您需要为Java授予完全磁盘访问"特权.

  1. 打开系统偏好设置
  2. 选择安全性和安全性"隐私"
  3. 选择隐私"标签,然后从左侧菜单中选择全盘访问"
  4. 单击左下角的锁定图标,并以管理员级别的登录名进行身份验证
  5. 单击+按钮添加应用程序
  6. 导航到/usr/bin/java.如果看不到/usr/文件夹,请键入 cmd + shift + .

多亏了这一点,错误操作"错误才得以解决.

Hello recently I upgraded my Mac mini from Mojave to Catalina (10.15.4) for new Xcode. Before updating my CI/CD pipeline used to work fine. My CI/CD pipeline is based on Azure. (I use my Machine as a build machine).

After updating to latest OS version and updating even the XCode. While running the pipeline it fails at "Flutter packages get" step showing this message ##[error]bash: "/Users/soap/documents/flutter/bin/flutter: Operation not permitted"

But when i run locally in machine (Navigating to my build agents folder and run these commands) it just work fine.

Note:

  • I have give the Full Disk permission to Terminal.
  • Gave R-W-X permissions to all folders.

Please help me out.

解决方案

You need to grant Java with Full Disk Access privileges.

  1. Open System Preferences
  2. Choose "Security & Privacy"
  3. Select the "Privacy" tab, and from the left-side menu select "Full Disk Access"
  4. Click the lock icon in the lower left corner and authenticate with an admin level login
  5. Click the + button to add an application
  6. Navigate to /usr/bin/java. If you don't see the /usr/ folder, type cmd+shift+.

Thanks to that, the "Operation not permitted" error was fix on our side.

这篇关于CI/CD管道中的Flutter命令出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆