Skip to content

Commit

Permalink
Merge pull request #1 from depot/fix-path
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie authored Mar 19, 2022
2 parents 59af729 + a48c4b8 commit 8b37f83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5438,6 +5438,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(31));
const http = __importStar(__nccwpck_require__(875));
const toolCache = __importStar(__nccwpck_require__(723));
const path = __importStar(__nccwpck_require__(17));
const client = new http.HttpClient('setup-depot');
async function run() {
// Get user-specified version to install (defaults to "latest")
Expand Down Expand Up @@ -5467,7 +5468,7 @@ async function resolveVersion(version) {
async function installDepotCLI(url, resolvedVersion) {
const tarPath = await toolCache.downloadTool(url);
const extractedPath = await toolCache.extractTar(tarPath);
const cachedPath = await toolCache.cacheDir(extractedPath, 'depot', resolvedVersion);
const cachedPath = await toolCache.cacheDir(path.join(extractedPath, 'bin'), 'depot', resolvedVersion);
core.addPath(cachedPath);
}
run().catch((error) => {
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as core from '@actions/core'
import * as http from '@actions/http-client'
import * as toolCache from '@actions/tool-cache'
import * as path from 'path'

type ApiResponse = {ok: true; url: string} | {ok: false; error: string}

Expand Down Expand Up @@ -39,7 +40,7 @@ async function resolveVersion(version: string) {
async function installDepotCLI(url: string, resolvedVersion: string) {
const tarPath = await toolCache.downloadTool(url)
const extractedPath = await toolCache.extractTar(tarPath)
const cachedPath = await toolCache.cacheDir(extractedPath, 'depot', resolvedVersion)
const cachedPath = await toolCache.cacheDir(path.join(extractedPath, 'bin'), 'depot', resolvedVersion)
core.addPath(cachedPath)
}

Expand Down

0 comments on commit 8b37f83

Please sign in to comment.