From ed1422b4fbfdc0bfdd44dd54900f03fb9838ad9b Mon Sep 17 00:00:00 2001 From: Tobe O Date: Mon, 6 May 2019 19:24:21 -0400 Subject: [PATCH] 2.0.6 --- CHANGELOG.md | 3 +++ lib/angel_hot.dart | 7 +++++-- pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4eb93fbd..efdc5ec2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 2.0.6 +* Support `--observe=*`, `--enable-vm-service=*` (`startsWith`, instead of `==`). + # 2.0.5 * Use `dart:developer` to find the Observatory URI. * Use the app's logger when necessary. diff --git a/lib/angel_hot.dart b/lib/angel_hot.dart index 888d5ed0..6cc8e44d 100644 --- a/lib/angel_hot.dart +++ b/lib/angel_hot.dart @@ -161,8 +161,11 @@ class HotReloader { _logWarning( 'You have instantiated a HotReloader without providing any filesystem paths to watch.'); - if (!Platform.executableArguments.contains('--observe') && - !Platform.executableArguments.contains('--enable-vm-service')) { + bool _sw(String s) { + return Platform.executableArguments.any((ss) => ss.startsWith(s)); + } + + if (!_sw('--observe') && !_sw('--enable-vm-service')) { _logWarning( 'You have instantiated a HotReloader without passing `--enable-vm-service` or `--observe` to the Dart VM. Hot reloading will be disabled.'); isHot = false; diff --git a/pubspec.yaml b/pubspec.yaml index c5a91a15..a1e51129 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: angel_hot description: Supports hot reloading/hot code push of Angel servers on file changes. -version: 2.0.5 +version: 2.0.6 author: Tobe O homepage: https://github.com/angel-dart/hot environment: