Add Dart SDK to PATH
environment variable
#1058
-
SummaryHey 👋 I would to open a feature request for adding the Dart SDK (that SDK that shipped with the Flutter SDK) by default to the ProblemBy default, the Flutter SDK contains a Dart SDK. There are tons of Dart packages, that helps you in CI/CD, like Melos (manage a monorepo, see https://blog.codemagic.io/flutter-monorepos), spec_cli (running tests), codemagic_app_preview (publishing app previews for pull requests), very_good_cli (manage a monorepo), cider (bump the app version), you need to be able to run To install a Dart package and use a Dart package, you need to add these two paths to your
This is a bit tricky and especially for new users not that easy to understand. In the past, I saw multiple messages in the support channel of the Slack because people needed help to run Dart packages. This shows that there are a bunch of people which have difficulties to solve this problem. WorkaroundTo do this, you can run these commands in your echo PATH="$PATH":"$FLUTTER_ROOT/.pub-cache/bin" >> $CM_ENV
echo PATH="$PATH":"$FLUTTER_ROOT/bin" >> $CM_ENV SolutionIt would be very useful when Codemagic adds the path to the Dart SDK by default. Because it's not that user-friendly for new users to understand how to add these paths. And it's a bit annoying to add for every new workflow these lines. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Both paths are now in the $PATH variable by default on all platforms. Please note that environment setup occurs during the "Preparing build machine step" so you may see the changes only if you connect to the builder machine after that step is complete. |
Beta Was this translation helpful? Give feedback.
Both paths are now in the $PATH variable by default on all platforms. Please note that environment setup occurs during the "Preparing build machine step" so you may see the changes only if you connect to the builder machine after that step is complete.