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
0d50604a
Unverified
Commit
0d50604a
authored
May 12, 2021
by
Taha Tesser
Committed by
GitHub
May 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[reland] Adding vscode path installed via snap (#81989)
parent
38840b41
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
vscode.dart
packages/flutter_tools/lib/src/vscode/vscode.dart
+2
-0
vscode_test.dart
.../flutter_tools/test/general.shard/vscode/vscode_test.dart
+13
-0
No files found.
packages/flutter_tools/lib/src/vscode/vscode.dart
View file @
0d50604a
...
...
@@ -239,6 +239,7 @@ class VsCode {
// Linux:
// /usr/share/code/bin/code
// /snap/code/current
// /usr/share/code-insiders/bin/code-insiders
// Linux Extensions:
// $HOME/.vscode/extensions
...
...
@@ -246,6 +247,7 @@ class VsCode {
static
List
<
VsCode
>
_installedLinux
(
FileSystem
fileSystem
,
Platform
platform
)
{
return
_findInstalled
(<
VsCodeInstallLocation
>[
const
VsCodeInstallLocation
(
'/usr/share/code'
,
'.vscode'
),
const
VsCodeInstallLocation
(
'/snap/code/current'
,
'.vscode'
),
const
VsCodeInstallLocation
(
'/usr/share/code-insiders'
,
'.vscode-insiders'
,
...
...
packages/flutter_tools/test/general.shard/vscode/vscode_test.dart
View file @
0d50604a
...
...
@@ -41,6 +41,19 @@ void main() {
expect
(
vsCode
.
version
,
Version
.
unknown
);
});
testWithoutContext
(
'can locate VS Code installed via Snap'
,
()
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
const
String
home
=
'/home/me'
;
final
Platform
platform
=
FakePlatform
(
operatingSystem:
'linux'
,
environment:
<
String
,
String
>{
'HOME'
:
home
});
fileSystem
.
directory
(
fileSystem
.
path
.
join
(
'/snap/code/current/'
,
'.vscode'
)).
createSync
(
recursive:
true
);
final
FakeProcessManager
processManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[]);
final
List
<
VsCode
>
installed
=
VsCode
.
allInstalled
(
fileSystem
,
platform
,
processManager
);
expect
(
installed
.
length
,
1
);
});
testWithoutContext
(
'can locate installations on macOS'
,
()
{
final
FileSystem
fileSystem
=
MemoryFileSystem
.
test
();
const
String
home
=
'/home/me'
;
...
...
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