Skip to content

Commit d7e53d4

Browse files
move hack flag to common (flutter#34754)
1 parent 830fb38 commit d7e53d4

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/flutter_tools/lib/src/base/common.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
import 'file_system.dart';
66
import 'platform.dart';
77

8+
/// Whether the tool started from the daemon, as opposed to the command line.
9+
// TODO(jonahwilliams): remove once IDE updates have rolled.
10+
bool isRunningFromDaemon = false;
11+
812
/// Return the absolute path of the user's home directory
913
String get homeDirPath {
1014
String path = platform.isWindows

packages/flutter_tools/lib/src/commands/daemon.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ import '../vmservice.dart';
2828

2929
const String protocolVersion = '0.5.2';
3030

31-
/// Whether the tool started from the daemon, as opposed to the command line.
32-
bool get isRunningFromDaemon => _isRunningFromDaemon;
33-
bool _isRunningFromDaemon = false;
34-
3531
/// A server process command. This command will start up a long-lived server.
3632
/// It reads JSON-RPC based commands from stdin, executes them, and returns
3733
/// JSON-RPC based responses and events to stdout.
@@ -53,7 +49,7 @@ class DaemonCommand extends FlutterCommand {
5349
@override
5450
Future<FlutterCommandResult> runCommand() async {
5551
printStatus('Starting device daemon...');
56-
_isRunningFromDaemon = true;
52+
isRunningFromDaemon = true;
5753

5854
final NotifyingLogger notifyingLogger = NotifyingLogger();
5955

packages/flutter_tools/lib/src/desktop.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import 'dart:async';
66

77
import 'package:meta/meta.dart';
88

9+
import 'base/common.dart';
910
import 'base/io.dart';
1011
import 'base/platform.dart';
1112
import 'base/process_manager.dart';
12-
import 'commands/daemon.dart' show isRunningFromDaemon;
1313
import 'convert.dart';
1414
import 'device.dart';
1515
import 'version.dart';

packages/flutter_tools/lib/src/web/workflow.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
import 'package:meta/meta.dart';
66

7+
import '../base/common.dart';
78
import '../base/context.dart';
89
import '../base/platform.dart';
910
import '../base/process_manager.dart';
10-
import '../commands/daemon.dart' show isRunningFromDaemon;
1111
import '../doctor.dart';
1212
import '../version.dart';
1313
import 'chrome.dart';

0 commit comments

Comments
 (0)