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
bb402700
Unverified
Commit
bb402700
authored
Jun 02, 2021
by
Greg Spencer
Committed by
GitHub
Jun 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more debug output to snippet git failures (#83806)
parent
8f866ab5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
main.dart
dev/snippets/lib/main.dart
+5
-2
No files found.
dev/snippets/lib/main.dart
View file @
bb402700
...
...
@@ -23,9 +23,12 @@ const String _kShowDartPad = 'dartpad';
String
getChannelName
(
)
{
final
RegExp
gitBranchRegexp
=
RegExp
(
r'^## (?<branch>.*)'
);
final
ProcessResult
gitResult
=
Process
.
runSync
(
'git'
,
<
String
>[
'status'
,
'-b'
,
'--porcelain'
]);
final
ProcessResult
gitResult
=
Process
.
runSync
(
'git'
,
<
String
>[
'status'
,
'-b'
,
'--porcelain'
],
environment:
<
String
,
String
>{
'GIT_TRACE'
:
'2'
,
'GIT_TRACE_SETUP'
:
'2'
,
},
includeParentEnvironment:
true
);
if
(
gitResult
.
exitCode
!=
0
)
throw
'git status exit with non-zero exit code:
${gitResult.exitCode}
'
;
throw
'git status exit with non-zero exit code:
${gitResult.exitCode}
:
${gitResult.stderr}
'
;
final
RegExpMatch
?
gitBranchMatch
=
gitBranchRegexp
.
firstMatch
(
(
gitResult
.
stdout
as
String
).
trim
().
split
(
'
\n
'
).
first
);
return
gitBranchMatch
==
null
?
'<unknown>'
:
gitBranchMatch
.
namedGroup
(
'branch'
)!.
split
(
'...'
).
first
;
...
...
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