From 0886129cab2b6f161313827a0fd877aafb7715e4 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Fri, 1 Dec 2023 17:22:54 +0100 Subject: [PATCH] Correctly import path --- actions/dl_deps_archive/dist/index.js | 55 ++++----------------------- actions/dl_deps_archive/index.js | 7 +++- 2 files changed, 12 insertions(+), 50 deletions(-) diff --git a/actions/dl_deps_archive/dist/index.js b/actions/dl_deps_archive/dist/index.js index bb44ddc..3e5c3de 100644 --- a/actions/dl_deps_archive/dist/index.js +++ b/actions/dl_deps_archive/dist/index.js @@ -30456,61 +30456,18 @@ module.exports = parseParams /******/ } /******/ /************************************************************************/ -/******/ /* webpack/runtime/compat get default export */ -/******/ (() => { -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __nccwpck_require__.n = (module) => { -/******/ var getter = module && module.__esModule ? -/******/ () => (module['default']) : -/******/ () => (module); -/******/ __nccwpck_require__.d(getter, { a: getter }); -/******/ return getter; -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/define property getters */ -/******/ (() => { -/******/ // define getter functions for harmony exports -/******/ __nccwpck_require__.d = (exports, definition) => { -/******/ for(var key in definition) { -/******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) { -/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); -/******/ } -/******/ } -/******/ }; -/******/ })(); -/******/ -/******/ /* webpack/runtime/hasOwnProperty shorthand */ -/******/ (() => { -/******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) -/******/ })(); -/******/ -/******/ /* webpack/runtime/make namespace object */ -/******/ (() => { -/******/ // define __esModule on exports -/******/ __nccwpck_require__.r = (exports) => { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ })(); -/******/ /******/ /* webpack/runtime/compat */ /******/ /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; /******/ /************************************************************************/ var __webpack_exports__ = {}; -// This entry need to be wrapped in an IIFE because it need to be in strict mode. +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { -"use strict"; -__nccwpck_require__.r(__webpack_exports__); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(1017); -/* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nccwpck_require__.n(path__WEBPACK_IMPORTED_MODULE_0__); const tc = __nccwpck_require__(8635); const core = __nccwpck_require__(2619); - +const path = __nccwpck_require__(1017); +const os = __nccwpck_require__(2037); function getInput(name, dflt) { const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`]; @@ -30521,7 +30478,7 @@ function getInput(name, dflt) { } function addLocalPath(inputPath) { - process.env['PATH'] = `${inputPath}${path__WEBPACK_IMPORTED_MODULE_0__.delimiter}${process.env['PATH']}` + process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}` } async function run() { @@ -30552,7 +30509,9 @@ async function run() { } } -addLocalPath('C:\\Program Files\\Git\\usr\\bin'); +if (os.platform() === 'win32') { + addLocalPath('C:\\Program Files\\Git\\usr\\bin'); +} core.setCommandEcho(true); run() diff --git a/actions/dl_deps_archive/index.js b/actions/dl_deps_archive/index.js index ed0be4b..4ed6dea 100644 --- a/actions/dl_deps_archive/index.js +++ b/actions/dl_deps_archive/index.js @@ -1,6 +1,7 @@ const tc = require('@actions/tool-cache'); const core = require('@actions/core'); -import * as path from 'path' +const path = require('path'); +const os = require('os'); function getInput(name, dflt) { const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`]; @@ -42,7 +43,9 @@ async function run() { } } -addLocalPath('C:\\Program Files\\Git\\usr\\bin'); +if (os.platform() === 'win32') { + addLocalPath('C:\\Program Files\\Git\\usr\\bin'); +} core.setCommandEcho(true); run()