File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 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.
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 ' );
You can’t perform that action at this time.
0 commit comments