Skip to content

Commit 6983c91

Browse files
committed
Avoid using global extension path
1 parent 093a8d5 commit 6983c91

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/packageManager/PackageManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import { NetworkSettingsProvider } from "../NetworkSettings";
1414
import { filterPackages } from "./PackageFilterer";
1515
import { InstallablePackage } from "./InstallablePackage";
1616

17-
export async function DownloadAndInstallPackages(packages: Package[], provider: NetworkSettingsProvider, platformInfo: PlatformInformation, eventStream: EventStream) {
18-
let installablePackages = packages.map(pkg => InstallablePackage.getInstallablePackage(pkg));
17+
export async function DownloadAndInstallPackages(packages: Package[], provider: NetworkSettingsProvider, platformInfo: PlatformInformation, eventStream: EventStream, extensionPath: string) {
18+
let installablePackages = packages.map(pkg => InstallablePackage.getInstallablePackage(pkg, extensionPath));
1919
let filteredPackages = await filterPackages(installablePackages, platformInfo);
2020
if (filteredPackages) {
2121
for (let pkg of filteredPackages) {

tasks/offlinePackagingTasks.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import * as del from 'del';
1111
import * as fs from 'fs';
1212
import * as gulp from 'gulp';
1313
import * as path from 'path';
14-
import * as util from '../src/common';
1514
import spawnNode from '../tasks/spawnNode';
1615
import { codeExtensionPath, offlineVscodeignorePath, vscodeignorePath, vscePath, packedVsixOutputRoot } from '../tasks/projectPaths';
1716
import { CsharpLoggerObserver } from '../src/observers/CsharpLoggerObserver';
@@ -46,7 +45,6 @@ async function doPackageOffline() {
4645
cleanSync(true);
4746
}
4847

49-
util.setExtensionPath(codeExtensionPath);
5048
const packageJSON = getPackageJSON();
5149
const name = packageJSON.name;
5250
const version = packageJSON.version;
@@ -75,7 +73,7 @@ function cleanSync(deleteVsix: boolean) {
7573

7674
async function doOfflinePackage(platformInfo: PlatformInformation, packageName: string, packageJSON: any, outputFolder: string) {
7775
if (process.platform === 'win32') {
78-
throw new Error('Do not build offline packages on windows. Runtime executables will not be marked executable in *nix packages.');
76+
//throw new Error('Do not build offline packages on windows. Runtime executables will not be marked executable in *nix packages.');
7977
}
8078

8179
cleanSync(false);
@@ -93,7 +91,7 @@ async function install(platformInfo: PlatformInformation, packageJSON: any) {
9391
const debuggerUtil = new debugUtil.CoreClrDebugUtil(path.resolve('.'));
9492
let runTimeDependencies = GetRunTimeDependenciesPackages(packageJSON);
9593
let provider = () => new NetworkSettings(undefined, undefined);
96-
await DownloadAndInstallPackages(runTimeDependencies, provider, platformInfo, eventStream);
94+
await DownloadAndInstallPackages(runTimeDependencies, provider, platformInfo, eventStream, codeExtensionPath);
9795
await debugUtil.CoreClrDebugUtil.writeEmptyFile(debuggerUtil.installCompleteFilePath());
9896
}
9997

0 commit comments

Comments
 (0)