Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
b20a1f4a
Commit
b20a1f4a
authored
Nov 18, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #457 from abarth/asset_error
Improve error message for non-existent asset
parents
ef596fdb
7b75d15d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
build.dart
packages/flutter_tools/lib/src/commands/build.dart
+9
-3
No files found.
packages/flutter_tools/lib/src/commands/build.dart
View file @
b20a1f4a
...
...
@@ -31,7 +31,7 @@ class _Asset {
Iterable
<
_Asset
>
_parseAssets
(
Map
manifestDescriptor
,
String
manifestPath
)
sync
*
{
if
(
manifestDescriptor
==
null
||
!
manifestDescriptor
.
containsKey
(
'assets'
))
return
;
String
basePath
=
new
File
(
manifestPath
).
parent
.
path
;
String
basePath
=
path
.
dirname
(
path
.
absolute
(
manifestPath
))
;
for
(
String
asset
in
manifestDescriptor
[
'assets'
])
yield
new
_Asset
(
base:
basePath
,
key:
asset
);
}
...
...
@@ -198,8 +198,14 @@ class BuildCommand extends FlutterCommand {
archive
.
addFile
(
_createSnapshotFile
(
snapshotPath
));
}
for
(
_Asset
asset
in
assets
)
archive
.
addFile
(
_createFile
(
asset
.
key
,
asset
.
base
));
for
(
_Asset
asset
in
assets
)
{
ArchiveFile
file
=
_createFile
(
asset
.
key
,
asset
.
base
);
if
(
file
==
null
)
{
stderr
.
writeln
(
'Cannot find asset "
${asset.key}
" in directory "
${path.absolute(asset.base)}
".'
);
return
1
;
}
archive
.
addFile
(
file
);
}
for
(
_MaterialAsset
asset
in
materialAssets
)
{
ArchiveFile
file
=
_createFile
(
asset
.
key
,
assetBase
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment