Use ykman-rpc from Flutter.

This commit is contained in:
Dain Nilsson 2022-02-10 13:47:58 +01:00
parent 8362cc2093
commit bfbfc51a00
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
2 changed files with 3 additions and 4 deletions

View File

@ -28,7 +28,7 @@ Future<List<Override>> initializeAndGetOverrides() async {
// Either use the _YKMAN_EXE environment variable, or look relative to executable.
var exe = Platform.environment['_YKMAN_PATH'];
if (exe?.isEmpty ?? true) {
var relativePath = 'ykman/ykman';
var relativePath = 'ykman-rpc/ykman-rpc';
if (Platform.isMacOS) {
relativePath = '../Resources/' + relativePath;
} else if (Platform.isWindows) {
@ -41,7 +41,7 @@ Future<List<Override>> initializeAndGetOverrides() async {
log.info('Starting subprocess: $exe');
var rpc = await RpcSession.launch(exe!);
log.info('ykman process started', exe);
log.info('ykman-rpc process started', exe);
rpc.setLogLevel(Logger.root.level);
return [

View File

@ -78,8 +78,7 @@ class RpcSession {
}
static Future<RpcSession> launch(String executable) async {
var process =
await Process.start(executable, [], environment: {'_YKMAN_RPC': '1'});
var process = await Process.start(executable, []);
return RpcSession(process);
}