Skip to content

Commit a077767

Browse files
authored
Workaround for broken travis (#1597)
* Workaround for broken travis * fix dependency on correct path setting
1 parent 4a009a0 commit a077767

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/src/io_utils.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ class SubprocessLauncher {
9191
}
9292

9393
SubprocessLauncher(this.context, [Map<String, String> environment]) {
94-
if (environment == null) this._environment = new Map();
94+
if (environment == null) {
95+
this._environment = new Map();
96+
} else {
97+
this._environment = environment;
98+
}
9599
}
96100

97101
/// A wrapper around start/await process.exitCode that will display the

tool/grind.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,13 @@ Future buildFlutterDocs() async {
242242
}
243243

244244
Future _buildFlutterDocs(String flutterPath, [String label]) async {
245+
Map<String, String> env = _createThrowawayPubCache();
246+
env['PATH'] = '${path.join(flutterPath, "bin")}:${env['PATH']}';
245247
var launcher = new SubprocessLauncher(
246248
'build-flutter-docs${label == null ? "" : "-$label"}',
247-
_createThrowawayPubCache());
249+
env);
248250
await launcher.runStreamed('git',
249-
['clone', '--depth', '1', 'https://github.com/flutter/flutter.git', '.'],
251+
['clone', 'https://github.com/flutter/flutter.git', '.'],
250252
workingDirectory: flutterPath);
251253
String flutterBin = path.join('bin', 'flutter');
252254
String flutterCacheDart =

0 commit comments

Comments
 (0)