diff --git a/.github/actions/dart_package/action.yaml b/.github/actions/dart_package/action.yaml index 6f0b3e39..96102122 100644 --- a/.github/actions/dart_package/action.yaml +++ b/.github/actions/dart_package/action.yaml @@ -51,7 +51,7 @@ runs: - working-directory: ${{ inputs.working_directory }} shell: ${{ inputs.shell }} - run: dart analyze --fatal-infos --fatal-warnings ${{inputs.analyze_directories}} + run: dart analyze --fatal-warnings ${{inputs.analyze_directories}} - working-directory: ${{ inputs.working_directory }} shell: ${{ inputs.shell }} diff --git a/packages/shorebird_cli/lib/src/commands/run_command.dart b/packages/shorebird_cli/lib/src/commands/run_command.dart index 099d58e5..3f2eb81a 100644 --- a/packages/shorebird_cli/lib/src/commands/run_command.dart +++ b/packages/shorebird_cli/lib/src/commands/run_command.dart @@ -95,6 +95,7 @@ class RunCommand extends Command { await _extractShorebirdEngine( shorebirdEngineCache.path, shorebirdEngine.path, + _startProcess, ); buildingEngine.complete(); } catch (error) { @@ -150,6 +151,7 @@ Future _downloadShorebirdEngine( Future _extractShorebirdEngine( String archivePath, String targetPath, + StartProcess startProcess, ) async { final targetDirectory = Directory(targetPath); @@ -164,4 +166,26 @@ Future _extractShorebirdEngine( extractArchiveToDisk(archive, targetPath); }, ); + + // TODO(felangel): support windows and linux + // https://github.com/shorebirdtech/shorebird/issues/37 + // coverage:ignore-start + if (Platform.isMacOS) { + const executables = [ + 'flutter/prebuilts/macos-x64/dart-sdk/bin/dart', + 'flutter/prebuilts/macos-x64/dart-sdk/bin/dartaotruntime', + 'out/android_release_arm64/clang_x64/gen_snapshot', + 'out/android_release_arm64/clang_x64/gen_snapshot_arm64', + 'out/android_release_arm64/clang_x64/impellerc', + ]; + + for (final executable in executables) { + final process = await startProcess( + 'chmod', + ['+x', p.join(targetPath, executable)], + ); + await process.exitCode; + } + } + // coverage:ignore-end }