Browse Source

CLI: print an error if no executable is found (and `--silent` is off)

tags/v8.0.0
Cédric Belin 2 weeks ago
parent
commit
cc3dc5a6be
2 changed files with 5 additions and 4 deletions
  1. +4
    -3
      bin/where.dart
  2. +1
    -1
      pubspec.yaml

+ 4
- 3
bin/where.dart View File

@@ -33,12 +33,13 @@ Future<void> main(List<String> args) async {
}
}

on FinderException {
on FinderException catch (e) {
if (!options.silent) print('No "${options.rest.first}" in (${e.finder.path.join(Finder.isWindows ? ";" : ":")}).');
exitCode = 1;
}

on Exception catch (err) {
print(err);
on Exception catch (e) {
print(e);
exitCode = 2;
}
}

+ 1
- 1
pubspec.yaml View File

@@ -1,5 +1,5 @@
name: where
version: 7.0.0
version: 8.0.0

description: Find the instances of an executable in the system path. Like the `which` Linux command.
homepage: https://docs.belin.io/where.dart


Loading…
Cancel
Save