-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(windows): fix plugin not working with remote extn pack
issue - RelativePattern not working on `local os: windows`
- Loading branch information
1 parent
22d8315
commit 7fd0579
Showing
3 changed files
with
43 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ExtensionContext } from 'vscode'; | ||
|
||
// NOTE same as vscode.ExtensionExecutionContext | ||
// this const can be replaced when we drop support of vscode <=1.35 | ||
const EXTENSION_EXECUTION_CONTEXT = { | ||
Local: 1, | ||
Remote: 2, | ||
}; | ||
|
||
export function isExtensionRunningLocally(context: ExtensionContext): boolean { | ||
// NOTE: executionContext is present in >=1.35 (when remote support added) | ||
// so using local as default value | ||
const executionContext = | ||
(context as any).executionContext || EXTENSION_EXECUTION_CONTEXT.Local; | ||
return executionContext === EXTENSION_EXECUTION_CONTEXT.Local; | ||
} |