"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const platform$1 = require("./platform.js");
let safeProcess;
if (typeof platform$1.globals.vscode !== "undefined" && typeof platform$1.globals.vscode.process !== "undefined") {
  const sandboxProcess = platform$1.globals.vscode.process;
  safeProcess = {
    get platform() {
      return sandboxProcess.platform;
    },
    get arch() {
      return sandboxProcess.arch;
    },
    get env() {
      return sandboxProcess.env;
    },
    cwd() {
      return sandboxProcess.cwd();
    }
  };
} else if (typeof process !== "undefined") {
  safeProcess = {
    get platform() {
      return process.platform;
    },
    get arch() {
      return process.arch;
    },
    get env() {
      return process.env;
    },
    cwd() {
      return process.env["VSCODE_CWD"] || process.cwd();
    }
  };
} else {
  safeProcess = {
    // Supported
    get platform() {
      return platform$1.isWindows ? "win32" : platform$1.isMacintosh ? "darwin" : "linux";
    },
    get arch() {
      return void 0;
    },
    // Unsupported
    get env() {
      return {};
    },
    cwd() {
      return "/";
    }
  };
}
const cwd = safeProcess.cwd;
const env = safeProcess.env;
const platform = safeProcess.platform;
exports.cwd = cwd;
exports.env = env;
exports.platform = platform;
