Skip to content

Commit 918cb75

Browse files
authored
Move chrome profile to .dart_tools (#316)
* Move chrome profile to .dart_toosl
1 parent 750f6a6 commit 918cb75

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

webdev/lib/src/serve/chrome.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'dart:async';
66
import 'dart:convert';
77
import 'dart:io';
88

9+
import 'package:path/path.dart' as p;
910
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';
1011

1112
import 'utils.dart';
@@ -62,7 +63,9 @@ class Chrome {
6263
///
6364
/// Each url in [urls] will be loaded in a separate tab.
6465
static Future<Chrome> start(List<String> urls, {int port}) async {
65-
var dataDir = Directory.systemTemp.createTempSync();
66+
var dataDir = Directory(p.joinAll(
67+
[Directory.current.path, '.dart_tool', 'webdev', 'chrome_profile']))
68+
..createSync(recursive: true);
6669
port = port == null || port == 0 ? await findUnusedPort() : port;
6770
var args = [
6871
// Using a tmp directory ensures that a new instance of chrome launches

0 commit comments

Comments
 (0)