Unverified Commit cf71a55f authored by Kristijan Žic's avatar Kristijan Žic Committed by GitHub

Added vscode-insiders path installed via snap (#137117)

Closes  #137116

<b>Before</b>
VS Code Insiders installed via Snap isn't detected.

<b>After</b>
```sh
[✓] VS Code (version 1.84.0-insider)
    • VS Code at /snap/code-insiders/current/usr/share/code-insiders
    • Flutter extension version 3.75.20231002
```
parent 7d9010c3
......@@ -240,6 +240,7 @@ class VsCode {
// /usr/share/code/bin/code
// /snap/code/current/usr/share/code
// /usr/share/code-insiders/bin/code-insiders
// /snap/code-insiders/current/usr/share/code-insiders
// Linux Extensions:
// $HOME/.vscode/extensions
// $HOME/.vscode-insiders/extensions
......@@ -251,6 +252,10 @@ class VsCode {
'/usr/share/code-insiders',
'.vscode-insiders',
),
const VsCodeInstallLocation(
'/snap/code-insiders/current/usr/share/code-insiders',
'.vscode-insiders',
),
], fileSystem, platform);
}
......
......@@ -46,11 +46,12 @@ void main() {
final Platform platform = FakePlatform(environment: <String, String>{'HOME': home});
fileSystem.directory(fileSystem.path.join('/snap/code/current/usr/share/code', '.vscode')).createSync(recursive: true);
fileSystem.directory(fileSystem.path.join('/snap/code-insiders/current/usr/share/code-insiders', '.vscode-insiders')).createSync(recursive: true);
final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[]);
final List<VsCode> installed = VsCode.allInstalled(fileSystem, platform, processManager);
expect(installed.length, 1);
expect(installed.length, 2);
});
testWithoutContext('can locate installations on macOS', () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment