Skip to content

Commit 450da98

Browse files
authored
Replace process lib with os lib for platform check
1 parent ce4200f commit 450da98

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

extensions/ql-vscode/src/extension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
import { LanguageClient } from 'vscode-languageclient';
1717
import * as os from 'os';
1818
import * as path from 'path';
19-
import process from 'process';
2019
import { testExplorerExtensionId, TestHub } from 'vscode-test-adapter-api';
2120

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

0 commit comments

Comments
 (0)