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
559d524e
Unverified
Commit
559d524e
authored
Oct 05, 2022
by
Christopher Fujino
Committed by
GitHub
Oct 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve debugging when dart pub get call fails (#112968)
parent
2c0d43e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
pub.dart
packages/flutter_tools/lib/src/dart/pub.dart
+4
-1
pub_get_test.dart
...s/flutter_tools/test/general.shard/dart/pub_get_test.dart
+1
-1
No files found.
packages/flutter_tools/lib/src/dart/pub.dart
View file @
559d524e
...
...
@@ -418,7 +418,10 @@ class _DefaultPub implements Pub {
status
?.
cancel
();
if
(
exception
is
io
.
ProcessException
)
{
final
StringBuffer
buffer
=
StringBuffer
(
'
${exception.message}
\n
'
);
buffer
.
writeln
(
'Working directory: "
$directory
"'
);
final
String
directoryExistsMessage
=
_fileSystem
.
directory
(
directory
).
existsSync
()
?
'exists'
:
'does not exist'
;
buffer
.
writeln
(
'Working directory: "
$directory
" (
$directoryExistsMessage
)'
);
final
Map
<
String
,
String
>
env
=
await
_createPubEnvironment
(
context
,
flutterRootOverride
);
buffer
.
write
(
_stringifyPubEnv
(
env
));
throw
io
.
ProcessException
(
...
...
packages/flutter_tools/test/general.shard/dart/pub_get_test.dart
View file @
559d524e
...
...
@@ -782,7 +782,7 @@ last line of pub output: "err3"
isA
<
ProcessException
>().
having
(
(
ProcessException
error
)
=>
error
.
message
,
'message'
,
contains
(
'Working directory: "/"'
),
contains
(
'Working directory: "/"
(exists)
'
),
).
having
(
(
ProcessException
error
)
=>
error
.
message
,
'message'
,
...
...
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