Skip to content

Commit d5a69c7

Browse files
committed
use stderr for logging
1 parent 6d1a141 commit d5a69c7

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

lib/src/flutterflow_api_client.dart

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ Future<String?> exportCode({
7676
String? commitHash,
7777
bool exportAsDebug = false,
7878
}) async {
79-
stdout.write('Downloading code with the FlutterFlow CLI...\n');
80-
stdout.write('You are exporting project $projectId.\n');
81-
stdout.write(
79+
stderr.write('Downloading code with the FlutterFlow CLI...\n');
80+
stderr.write('You are exporting project $projectId.\n');
81+
stderr.write(
8282
'${branchName != null ? 'Branch: $branchName ' : ''}${environmentName != null ? 'Environment: $environmentName ' : ''}${commitHash != null ? 'Commit: $commitHash' : ''}\n');
8383
if (exportAsDebug && exportAsModule) {
8484
throw 'Cannot export as module and debug at the same time.';
@@ -110,8 +110,6 @@ Future<String?> exportCode({
110110
extractArchiveToCurrentDirectory(projectFolder, destinationPath);
111111
}
112112

113-
stdout.write('Successfully downloaded the code!\n');
114-
115113
folderName = projectFolder.first.name;
116114

117115
final postCodeGenerationFutures = <Future>[
@@ -136,7 +134,7 @@ Future<String?> exportCode({
136134
} finally {
137135
client.close();
138136
}
139-
stdout.write('All done!\n');
137+
stderr.write('All done!\n');
140138
return folderName;
141139
}
142140

@@ -268,7 +266,7 @@ Future _downloadAssets({
268266
stderr.write('Error downloading asset $path. This is probably fine.\n');
269267
}
270268
});
271-
stdout.write('Downloading assets...\n');
269+
stderr.write('Downloading assets...\n');
272270
await Future.wait(futures);
273271
}
274272

@@ -287,7 +285,7 @@ Future _runFix({
287285
final workingDirectory = unzipToParentFolder
288286
? path_util.join(destinationPath, directory)
289287
: destinationPath;
290-
stdout.write('Running flutter pub get...\n');
288+
stderr.write('Running flutter pub get...\n');
291289
final pubGetResult = await Process.run(
292290
'flutter',
293291
['pub', 'get'],
@@ -301,7 +299,7 @@ Future _runFix({
301299
'"flutter pub get" failed with code ${pubGetResult.exitCode}, stderr:\n${pubGetResult.stderr}\n');
302300
return;
303301
}
304-
stdout.write('Running dart fix...\n');
302+
stderr.write('Running dart fix...\n');
305303
final fixDirectory = unzipToParentFolder ? directory : '';
306304
final dartFixResult = await Process.run(
307305
'dart',
@@ -373,7 +371,7 @@ Future firebaseDeploy({
373371
);
374372
}
375373

376-
stdout.write('Initializing firebase...\n');
374+
stderr.write('Initializing firebase...\n');
377375
await Process.run(
378376
'firebase',
379377
['use', firebaseProjectId],

0 commit comments

Comments
 (0)