Reputation: 333
I try to build a flutter application using Azure DevOps using a flutter-build extension. But continuously I got a Errors:
##[error]Error: Failed cd: cd: no such file or directory: /Users/runner/runners/2.159.2/work/1/s/app_name
I think it's a project directory error. I try to change it using variable but couldn't make it.
Is there any way to set Path to the project folder and Path to the Flutter SDK. because couldn't select the path?
Upvotes: 1
Views: 1675
Reputation: 30333
When you choose Flutter build task. The path to project and sdk can be configured at the right pane. Please have a check at below screenshot.
You can click on the 3dots as highlighted for Path to the project folder option, to locate to your project folder.
Or you can use predefined variables(Build.SourcesDirectory) to specify the path to project folder. Check here for more prefined variables that you can use directly in your pipeline.
If you are running your pipeline on your local hosted agent. You can specify the path to flutter SDK like below example.
If you are on a cloud hosted agent. You may need to use Flutter Install task to install Flutter sdk on the hosted agents.
Upvotes: 2