Skip to content

Commit

Permalink
Replace process lib with os lib for platform check
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsium authored Oct 21, 2021
1 parent ce4200f commit 450da98
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions extensions/ql-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
import { LanguageClient } from 'vscode-languageclient';
import * as os from 'os';
import * as path from 'path';
import process from 'process';
import { testExplorerExtensionId, TestHub } from 'vscode-test-adapter-api';

import { AstViewer } from './astViewer';
Expand Down Expand Up @@ -502,7 +501,7 @@ async function activateWithInstalledDistribution(
let resolved;
try {
let queryPath: string = selectedQuery.path;
if (platform.process === 'win32') {
if (os.type() === 'Windows_NT') {
// replaces leading '/' in the query path if followed by a windows drive letter
queryPath = queryPath.replace(/^\/([a-zA-Z]:)/, '$1');
}
Expand Down

0 comments on commit 450da98

Please sign in to comment.