terminalSandboxEngine.ts ×14

Frontier kind: Code frontier

unlabeled · c_18a1e518dedd

3 tests · 12866 LOC · 57 files · introduces 0 tests · 33 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
14 ranges33 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2084 ranges12866 lines · 57 files · Browse complete extent
All tests (intent)
3 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 33 introduced LOC across 14 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/sandbox/common/terminalSandboxEngine.ts 33 introduced LOC · 14 ranges

Open complete file

320 };
321 }
323 > const sandboxConfigPath = await this.getSandboxConfigPath(forceRefresh, precheckInputs);
324 > if (!sandboxConfigPath) {
325 return {
326 enabled: true,
329 };
330 }
332 > if (!(await this._checkSandboxDependencies(forceRefresh))) {
333 > const missingDependencies = await this.getMissingSandboxDependencies();
334 > if (missingDependencies.length === 0 && this._sandboxDependencyStatus?.bubblewrapInstalled && !this._sandboxDependencyStatus.bubblewrapUsable) {
335 return {
336 enabled: true,
347 missingDependencies,
348 canInstallMissingDependencies: !!this._sandboxDependencyStatus?.dependencyInstallCommand,
350 > }
351
352 return {
392
393 async getMissingSandboxDependencies(): Promise<string[]> {
394 > const os = await this.getOS(); terminalSandboxEngine.ts
395 > if (os === OperatingSystem.Windows) {
396 return [];
397 }
399 > if (!this._sandboxDependencyStatus) {
400 this._sandboxDependencyStatus = await this._host.checkSandboxDependencies();
401 }
403 > const missing: string[] = [];
404 > if (this._sandboxDependencyStatus && !this._sandboxDependencyStatus.bubblewrapInstalled) {
405 missing.push('bubblewrap');
406 }
407 > if (this._sandboxDependencyStatus && !this._sandboxDependencyStatus.socatInstalled) { terminalSandboxEngine.ts
408 missing.push('socat');
409 }
410 > return missing; terminalSandboxEngine.ts
411 > }
412
413 /**
431
432 private async _checkSandboxDependencies(forceRefresh = false): Promise<boolean> {
433 > const os = await this.getOS(); terminalSandboxEngine.ts
434 > if (os === OperatingSystem.Windows) {
435 return true;
436 }
438 > if (!forceRefresh && this._sandboxDependencyStatus) {
439 return this._sandboxDependencyStatus.bubblewrapInstalled && this._sandboxDependencyStatus.bubblewrapUsable && this._sandboxDependencyStatus.socatInstalled;
440 }
442 > const status = await this._host.checkSandboxDependencies();
443 > this._sandboxDependencyStatus = status;
444 >
445 > if (status && !status.bubblewrapInstalled) {
446 this._logService.warn('TerminalSandboxEngine: bubblewrap (bwrap) is not installed');
447 > } else if (status && !status.bubblewrapUsable) { terminalSandboxEngine.ts
448 this._logService.warn('TerminalSandboxEngine: bubblewrap (bwrap) is installed but failed its capability check', status.bubblewrapError);
449 }
450 > if (status && !status.socatInstalled) { terminalSandboxEngine.ts
451 this._logService.warn('TerminalSandboxEngine: socat is not installed');
452 }
454 > return status ? status.bubblewrapInstalled && status.bubblewrapUsable && status.socatInstalled : true;
455 > }
456
457 private _getBubblewrapRemediations(): readonly TerminalSandboxPreCheckRemediation[] | undefined {