Skip to content

Remove unused tempDirectory definition code #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test-typescript-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Set Node.js 10.x
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 12.x
Expand Down
16 changes: 0 additions & 16 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getTask = void 0;
// Load tempDirectory before it gets wiped by tool-cache
const os = __importStar(__nccwpck_require__(2087));
const path = __importStar(__nccwpck_require__(5622));
const util = __importStar(__nccwpck_require__(1669));
const restm = __importStar(__nccwpck_require__(7405));
const semver = __importStar(__nccwpck_require__(1383));
const core = __importStar(__nccwpck_require__(2186));
const tc = __importStar(__nccwpck_require__(7784));
let tempDirectory = process.env.RUNNER_TEMP || "";
if (!tempDirectory) {
let baseLocation;
if (process.platform === "win32") {
// On windows use the USERPROFILE env variable
baseLocation = process.env.USERPROFILE || "C:\\";
}
else if (process.platform === "darwin") {
baseLocation = "/Users";
}
else {
baseLocation = "/home";
}
tempDirectory = path.join(baseLocation, "actions", "temp");
}
const io = __nccwpck_require__(7436);
const osPlat = os.platform();
const osArch = os.arch();
Expand Down
15 changes: 0 additions & 15 deletions src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
// software without disclosing the source code of your own applications. To purchase
// a commercial license, send an email to [email protected]

// Load tempDirectory before it gets wiped by tool-cache
import * as os from "os";
import * as path from "path";
import * as util from "util";
Expand All @@ -20,20 +19,6 @@ import * as semver from "semver";
import * as core from "@actions/core";
import * as tc from "@actions/tool-cache";

let tempDirectory = process.env.RUNNER_TEMP || "";

if (!tempDirectory) {
let baseLocation;
if (process.platform === "win32") {
// On windows use the USERPROFILE env variable
baseLocation = process.env.USERPROFILE || "C:\\";
} else if (process.platform === "darwin") {
baseLocation = "/Users";
} else {
baseLocation = "/home";
}
tempDirectory = path.join(baseLocation, "actions", "temp");
}
import io = require("@actions/io");

const osPlat: string = os.platform();
Expand Down