Skip to content

Commit 9b98caf

Browse files
committed
Merge branch 'main' into wenkai/export_as_module
2 parents 02d37ca + 082548c commit 9b98caf

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
## 0.0.12
1+
## 0.0.13
22

33
- Add `--as-module` option.
44

5+
## 0.0.12
6+
7+
- Fix `FLUTTERFLOW_PROJECT` environment variable issue.
8+
- Fix downloading assets when the parent directory does not exist.
9+
510
## 0.0.11
611

712
- Fix `--fix` `--no-parent-folder` edge case.

bin/flutterflow_cli.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ void main(List<String> args) async {
1414
final project = parsedArguments.command!['project'] ??
1515
Platform.environment['FLUTTERFLOW_PROJECT'];
1616

17+
if (project == null || project.isEmpty) {
18+
stderr.write(
19+
'Either --project option or FLUTTERFLOW_PROJECT environment variable must be set.\n');
20+
exit(1);
21+
}
22+
1723
if (parsedArguments['endpoint'] != null &&
1824
parsedArguments['environment'] != null) {
1925
stderr.write(
@@ -120,11 +126,5 @@ ArgResults _parseArgs(List<String> args) {
120126
exit(1);
121127
}
122128

123-
if (parsed.command!['project'] == null ||
124-
parsed.command!['project'].isEmpty) {
125-
stderr.write(
126-
'Either --project option or FLUTTERFLOW_PROJECT environment variable must be set.\n');
127-
exit(1);
128-
}
129129
return parsed;
130130
}

lib/src/flutterflow_cli_base.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ Future _downloadAssets({
202202
final response = await client.get(Uri.parse(url));
203203
if (response.statusCode >= 200 && response.statusCode < 300) {
204204
final file = File(fileDest);
205+
await file.parent.create(recursive: true);
205206
await file.writeAsBytes(response.bodyBytes);
206207
} else {
207208
stderr.write('Error downloading asset $path. This is probably fine.\n');

0 commit comments

Comments
 (0)