Skip to content

Commit

Permalink
Clean up path.join syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasAlbertQC committed May 23, 2022
1 parent 5330fe6 commit 3b05471
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 55 deletions.
62 changes: 8 additions & 54 deletions dist/setup/index.js
Expand Up @@ -6951,7 +6951,7 @@ function ensureLocalInstaller(options) {
let cacheDirectoryPath = tc.find(installerName, version, ...(options.arch ? [options.arch] : []));
if (cacheDirectoryPath !== "") {
core.info(`Found ${installerName} cache at ${cacheDirectoryPath}!`);
executablePath = cacheDirectoryPath + "/" + installerName;
executablePath = path.join(cacheDirectoryPath, installerName);
core.info(`executablePath is ${executablePath}`);
}
else {
Expand Down Expand Up @@ -24283,31 +24283,7 @@ module.exports = YAMLException;
/* 559 */,
/* 560 */,
/* 561 */,
/* 562 */
/***/ (function(module) {

/** Used to match a single whitespace character. */
var reWhitespace = /\s/;

/**
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
* character of `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the index of the last non-whitespace character.
*/
function trimmedEndIndex(string) {
var index = string.length;

while (index-- && reWhitespace.test(string.charAt(index))) {}
return index;
}

module.exports = trimmedEndIndex;


/***/ }),
/* 562 */,
/* 563 */
/***/ (function(module) {

Expand Down Expand Up @@ -32289,13 +32265,15 @@ module.exports = getWrapDetails;
/* 790 */
/***/ (function(module, __unusedexports, __webpack_require__) {

var baseTrim = __webpack_require__(984),
isObject = __webpack_require__(988),
var isObject = __webpack_require__(988),
isSymbol = __webpack_require__(186);

/** Used as references for various `Number` constants. */
var NAN = 0 / 0;

/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;

/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;

Expand Down Expand Up @@ -32345,7 +32323,7 @@ function toNumber(value) {
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = baseTrim(value);
value = value.replace(reTrim, '');
var isBinary = reIsBinary.test(value);
return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
Expand Down Expand Up @@ -38437,31 +38415,7 @@ module.exports = cacheHas;


/***/ }),
/* 984 */
/***/ (function(module, __unusedexports, __webpack_require__) {

var trimmedEndIndex = __webpack_require__(562);

/** Used to match leading whitespace. */
var reTrimStart = /^\s+/;

/**
* The base implementation of `_.trim`.
*
* @private
* @param {string} string The string to trim.
* @returns {string} Returns the trimmed string.
*/
function baseTrim(string) {
return string
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
: string;
}

module.exports = baseTrim;


/***/ }),
/* 984 */,
/* 985 */
/***/ (function(module, __unusedexports, __webpack_require__) {

Expand Down
2 changes: 1 addition & 1 deletion src/installer/base.ts
Expand Up @@ -53,7 +53,7 @@ export async function ensureLocalInstaller(
);
if (cacheDirectoryPath !== "") {
core.info(`Found ${installerName} cache at ${cacheDirectoryPath}!`);
executablePath = path.join([cacheDirectoryPath, installerName]);
executablePath = path.join(cacheDirectoryPath, installerName);
core.info(`executablePath is ${executablePath}`);
} else {
core.info(`Did not find ${installerName} ${version} in cache`);
Expand Down

0 comments on commit 3b05471

Please sign in to comment.