fix minor nitpicks

This commit is contained in:
Maxim Lobanov 2021-03-10 11:21:11 +03:00
parent e6d2942770
commit fb17d0223d
4 changed files with 5 additions and 9 deletions

View file

@ -1535,8 +1535,7 @@ const os_1 = __importDefault(__webpack_require__(87));
const path_1 = __importDefault(__webpack_require__(622)); const path_1 = __importDefault(__webpack_require__(622));
const tc = __importStar(__webpack_require__(533)); const tc = __importStar(__webpack_require__(533));
function getTempDir() { function getTempDir() {
let tempDirectory = process.env['RUNNER_TEMP'] || os_1.default.tmpdir(); return process.env['RUNNER_TEMP'] || os_1.default.tmpdir();
return tempDirectory;
} }
exports.getTempDir = getTempDir; exports.getTempDir = getTempDir;
function getVersionFromToolcachePath(toolPath) { function getVersionFromToolcachePath(toolPath) {

5
dist/setup/index.js vendored
View file

@ -12930,8 +12930,7 @@ const os_1 = __importDefault(__webpack_require__(87));
const path_1 = __importDefault(__webpack_require__(622)); const path_1 = __importDefault(__webpack_require__(622));
const tc = __importStar(__webpack_require__(139)); const tc = __importStar(__webpack_require__(139));
function getTempDir() { function getTempDir() {
let tempDirectory = process.env['RUNNER_TEMP'] || os_1.default.tmpdir(); return process.env['RUNNER_TEMP'] || os_1.default.tmpdir();
return tempDirectory;
} }
exports.getTempDir = getTempDir; exports.getTempDir = getTempDir;
function getVersionFromToolcachePath(toolPath) { function getVersionFromToolcachePath(toolPath) {
@ -13294,7 +13293,7 @@ function write(directory, settings) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const location = path.join(directory, exports.SETTINGS_FILE); const location = path.join(directory, exports.SETTINGS_FILE);
if (fs.existsSync(location)) { if (fs.existsSync(location)) {
core.warning(`Overwriting existing file ${location}`); core.info(`Overwriting existing file ${location}`);
} }
else { else {
core.info(`Writing ${location}`); core.info(`Writing ${location}`);

View file

@ -101,7 +101,7 @@ export function generate(
async function write(directory: string, settings: string) { async function write(directory: string, settings: string) {
const location = path.join(directory, SETTINGS_FILE); const location = path.join(directory, SETTINGS_FILE);
if (fs.existsSync(location)) { if (fs.existsSync(location)) {
core.warning(`Overwriting existing file ${location}`); core.info(`Overwriting existing file ${location}`);
} else { } else {
core.info(`Writing ${location}`); core.info(`Writing ${location}`);
} }

View file

@ -4,9 +4,7 @@ import path from 'path';
import * as tc from '@actions/tool-cache'; import * as tc from '@actions/tool-cache';
export function getTempDir() { export function getTempDir() {
let tempDirectory = process.env['RUNNER_TEMP'] || os.tmpdir(); return process.env['RUNNER_TEMP'] || os.tmpdir();
return tempDirectory;
} }
export function getVersionFromToolcachePath(toolPath: string) { export function getVersionFromToolcachePath(toolPath: string) {