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
bf97313a
Commit
bf97313a
authored
Mar 01, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2276 from abarth/detached_head
Flutter --version can't handle detached HEAD
parents
1f8434fa
18a2525f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
version.dart
packages/flutter_tools/lib/src/runner/version.dart
+5
-7
No files found.
packages/flutter_tools/lib/src/runner/version.dart
View file @
bf97313a
...
...
@@ -9,7 +9,7 @@ String getVersion(String flutterRoot) {
String
upstream
=
runSync
([
'git'
,
'rev-parse'
,
'--abbrev-ref'
,
'--symbolic'
,
'@{u}'
],
workingDirectory:
flutterRoot
).
trim
();
String
repository
=
'<unknown>'
;
String
repository
;
int
slash
=
upstream
.
indexOf
(
'/'
);
if
(
slash
!=
-
1
)
{
String
remote
=
upstream
.
substring
(
0
,
slash
);
...
...
@@ -22,11 +22,9 @@ String getVersion(String flutterRoot) {
'git'
,
'log'
,
'-n'
,
'1'
,
'--pretty=format:%H (%ar)'
],
workingDirectory:
flutterRoot
).
trim
();
String
version
=
'Flutter from
$repository
(on
$upstream
)
\n
flutter revision:
$revision
'
;
String
from
=
repository
==
null
?
'Flutter from unknown source'
:
'Flutter from
$repository
(on
$upstream
)'
;
String
flutterVersion
=
'Framework:
$revision
'
;
String
engineRevision
=
'Engine:
${ArtifactStore.engineRevision}
'
;
String
engineRevision
=
ArtifactStore
.
engineRevision
;
if
(
engineRevision
!=
null
)
version
+=
'
\n
engine revision :
$engineRevision
'
;
return
version
;
return
'
$from
\n
$flutterVersion
\n
$engineRevision
'
;
}
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