Fix crash due to not awaiting print
This commit is contained in:
parent
317d6930f9
commit
78104ed1b7
1 changed files with 4 additions and 4 deletions
|
@ -16,7 +16,7 @@ import 'package:libac_dart/consts.dart';
|
|||
import 'package:libac_dart/utils/IOTools.dart';
|
||||
|
||||
Future<int> main(List<String> args) async {
|
||||
String VERSION = "1.0.082424.0715";
|
||||
String VERSION = "1.0.082424.0720";
|
||||
bool verbose = false;
|
||||
String HEADER =
|
||||
"Make File System Report\nVersion: $VERSION\nUsing LibAC Version: ${Constants.VERSION}\nAuthor: Tara Piccari\n\n";
|
||||
|
@ -61,16 +61,16 @@ Future<int> main(List<String> args) async {
|
|||
cacheSize: true, recursive: true, verbose: parsed.hasArg("o"));
|
||||
FileInformationCache FIC = FileInformationCache.obtain();
|
||||
|
||||
if (verbose) prnt("\r> Generating report...");
|
||||
if (verbose) await prnt("\r> Generating report...");
|
||||
|
||||
String report =
|
||||
await generateHTMLReport(FIC, ascending: ascending, VERSION: VERSION);
|
||||
|
||||
if (verbose) {
|
||||
StringArgument outputPath = parsed.getArg("out") as StringArgument;
|
||||
prnt("\n> Saving report...");
|
||||
await prnt("\n> Saving report...");
|
||||
await File(outputPath.value).writeAsString(report);
|
||||
prnt("\n> Task Completed\n");
|
||||
await prnt("\n> Task Completed\n");
|
||||
} else {
|
||||
print(report);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue