@@ -29031,7 +29031,7 @@ class LinuxChannelInstaller {
2903129031 yield node_fs_1.default.promises.unlink(node_path_1.default.join(extdir, "google-chrome"));
2903229032 const root = yield cache.cacheDir(extdir, "chromium", version);
2903329033 core.info(`Successfully Installed chromium to ${root}`);
29034- return { root: extdir , bin: "chrome" };
29034+ return { root, bin: "chrome" };
2903529035 });
2903629036 }
2903729037}
@@ -29374,7 +29374,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
2937429374Object.defineProperty(exports, "__esModule", ({ value: true }));
2937529375exports.installDependencies = void 0;
2937629376const core = __importStar(__nccwpck_require__(9093));
29377- const actions_swing_1 = __nccwpck_require__(7353 );
29377+ const actions_swing_1 = __nccwpck_require__(1518 );
2937829378const DEBIAN_BASED_DEPENDENT_PACKAGES = [
2937929379 "libglib2.0-0",
2938029380 "libgconf-2-4",
@@ -29422,7 +29422,8 @@ const SUSE_BASED_DEPENDENT_PACKAGES = [
2942229422 "libXrandr2",
2942329423 "mozilla-nss",
2942429424];
29425- const installDependencies = (platform) => __awaiter(void 0, void 0, void 0, function* () {
29425+ const installDependencies = (platform, { noSudo }) => __awaiter(void 0, void 0, void 0, function* () {
29426+ var _a;
2942629427 if (platform.os !== "linux") {
2942729428 core.warning(`install-dependencies is only supported on Linux, but current platform is ${platform.os}`);
2942829429 return;
@@ -29446,7 +29447,8 @@ const installDependencies = (platform) => __awaiter(void 0, void 0, void 0, func
2944629447 }
2944729448 throw new Error(`Unsupported OS: ${osReleaseId}`);
2944829449 }))();
29449- yield actions_swing_1.pkg.install(packages);
29450+ const sudo = !noSudo && ((_a = process.getuid) === null || _a === void 0 ? void 0 : _a.call(process)) !== 0;
29451+ yield actions_swing_1.pkg.install(packages, { sudo });
2945029452});
2945129453exports.installDependencies = installDependencies;
2945229454
@@ -29533,9 +29535,10 @@ function run() {
2953329535 const version = core.getInput("chrome-version") || "latest";
2953429536 const platform = (0, platform_1.getPlatform)();
2953529537 const flagInstallDependencies = core.getInput("install-dependencies") === "true";
29538+ const noSudo = core.getInput("no-sudo") === "true";
2953629539 if (flagInstallDependencies) {
2953729540 core.info("Installing dependencies");
29538- yield (0, dependencies_1.installDependencies)(platform);
29541+ yield (0, dependencies_1.installDependencies)(platform, { noSudo } );
2953929542 }
2954029543 core.info(`Setup chromium ${version}`);
2954129544 const binPath = yield installer.install(platform, version);
@@ -32124,7 +32127,7 @@ module.exports = parseParams
3212432127
3212532128/***/ }),
3212632129
32127- /***/ 7353 :
32130+ /***/ 1518 :
3212832131/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
3212932132
3213032133"use strict";
@@ -32144,7 +32147,7 @@ var core = __nccwpck_require__(9093);
3214432147var exec = __nccwpck_require__(7775);
3214532148;// CONCATENATED MODULE: external "fs/promises"
3214632149const promises_namespaceObject = require("fs/promises");
32147- ;// CONCATENATED MODULE: ./node_modules/.pnpm/actions-swing@0.0.5_ @actions+core@1.10.1_@actions+exec@1.1.1/node_modules/actions-swing/dist/index.js
32150+ ;// CONCATENATED MODULE: ./node_modules/.pnpm/actions-swing@0.0.6_ @actions+core@1.10.1_@actions+exec@1.1.1/node_modules/actions-swing/dist/index.js
3214832151var __defProp = Object.defineProperty;
3214932152var __export = (target, all) => {
3215032153 for (var name in all)
@@ -32230,8 +32233,12 @@ var ZypperPackageManager = class {
3223032233 await (0,exec.exec)("zypper", ["install", "--no-confirm", ...packageName]);
3223132234 }
3223232235 }
32233- async uninstall(packageName) {
32234- await (0,exec.exec)("zypper", ["remove", "--no-confirm", ...packageName]);
32236+ async uninstall(packageName, opts) {
32237+ if (opts?.sudo) {
32238+ await (0,exec.exec)("sudo", ["zypper", "remove", "--no-confirm", ...packageName]);
32239+ } else {
32240+ await (0,exec.exec)("zypper", ["remove", "--no-confirm", ...packageName]);
32241+ }
3223532242 }
3223632243};
3223732244var AptPackageManager = class {
0 commit comments