at master 1.2 kB view raw
1From ddb81649092776ecac635af7040685588798b5a5 Mon Sep 17 00:00:00 2001 2From: hacker1024 <hacker1024@users.sourceforge.net> 3Date: Sun, 27 Aug 2023 22:47:24 +1000 4Subject: [PATCH] Allow replacing the Dart binary used for Pub commands with 5 NIX_FLUTTER_PUB_DART 6 7--- 8 packages/flutter_tools/lib/src/dart/pub.dart | 3 ++- 9 1 file changed, 2 insertions(+), 1 deletion(-) 10 11diff --git a/packages/flutter_tools/lib/src/dart/pub.dart b/packages/flutter_tools/lib/src/dart/pub.dart 12index 40e60f9005..22fd3cebc7 100644 13--- a/packages/flutter_tools/lib/src/dart/pub.dart 14+++ b/packages/flutter_tools/lib/src/dart/pub.dart 15@@ -3,6 +3,7 @@ 16 // found in the LICENSE file. 17 18 import 'dart:async'; 19+import 'dart:io' as io; 20 21 import 'package:meta/meta.dart'; 22 import 'package:package_config/package_config.dart'; 23@@ -544,7 +545,7 @@ class _DefaultPub implements Pub { 24 25 List<String> _computePubCommand() { 26 // TODO(zanderso): refactor to use artifacts. 27- final String sdkPath = _fileSystem.path.joinAll(<String>[ 28+ final String sdkPath = io.Platform.environment['NIX_FLUTTER_PUB_DART'] ?? _fileSystem.path.joinAll(<String>[ 29 Cache.flutterRoot!, 30 'bin', 31 'cache', 32-- 332.41.0 34