Skip to content

Commit accf38b

Browse files
authored
Merge pull request #62 from per1234/fix-imports
Remove unused `tempDirectory` definition code
2 parents d3a3c61 + ee66277 commit accf38b

File tree

3 files changed

+1
-32
lines changed

3 files changed

+1
-32
lines changed

.github/workflows/test-typescript-task.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Checkout
4848
uses: actions/checkout@v2
4949

50-
- name: Set Node.js 10.x
50+
- name: Setup Node.js
5151
uses: actions/setup-node@v2
5252
with:
5353
node-version: 12.x

dist/index.js

-16
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
4747
};
4848
Object.defineProperty(exports, "__esModule", ({ value: true }));
4949
exports.getTask = void 0;
50-
// Load tempDirectory before it gets wiped by tool-cache
5150
const os = __importStar(__nccwpck_require__(2087));
5251
const path = __importStar(__nccwpck_require__(5622));
5352
const util = __importStar(__nccwpck_require__(1669));
5453
const restm = __importStar(__nccwpck_require__(7405));
5554
const semver = __importStar(__nccwpck_require__(1383));
5655
const core = __importStar(__nccwpck_require__(2186));
5756
const tc = __importStar(__nccwpck_require__(7784));
58-
let tempDirectory = process.env.RUNNER_TEMP || "";
59-
if (!tempDirectory) {
60-
let baseLocation;
61-
if (process.platform === "win32") {
62-
// On windows use the USERPROFILE env variable
63-
baseLocation = process.env.USERPROFILE || "C:\\";
64-
}
65-
else if (process.platform === "darwin") {
66-
baseLocation = "/Users";
67-
}
68-
else {
69-
baseLocation = "/home";
70-
}
71-
tempDirectory = path.join(baseLocation, "actions", "temp");
72-
}
7357
const io = __nccwpck_require__(7436);
7458
const osPlat = os.platform();
7559
const osArch = os.arch();

src/installer.ts

-15
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// software without disclosing the source code of your own applications. To purchase
1111
// a commercial license, send an email to [email protected]
1212

13-
// Load tempDirectory before it gets wiped by tool-cache
1413
import * as os from "os";
1514
import * as path from "path";
1615
import * as util from "util";
@@ -20,20 +19,6 @@ import * as semver from "semver";
2019
import * as core from "@actions/core";
2120
import * as tc from "@actions/tool-cache";
2221

23-
let tempDirectory = process.env.RUNNER_TEMP || "";
24-
25-
if (!tempDirectory) {
26-
let baseLocation;
27-
if (process.platform === "win32") {
28-
// On windows use the USERPROFILE env variable
29-
baseLocation = process.env.USERPROFILE || "C:\\";
30-
} else if (process.platform === "darwin") {
31-
baseLocation = "/Users";
32-
} else {
33-
baseLocation = "/home";
34-
}
35-
tempDirectory = path.join(baseLocation, "actions", "temp");
36-
}
3722
import io = require("@actions/io");
3823

3924
const osPlat: string = os.platform();

0 commit comments

Comments
 (0)