Skip to content

Commit

Permalink
Fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed May 7, 2020
1 parent f9fe3d6 commit 7fd7b98
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
setupFiles: ["dotenv/config"],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@types/jest": "^25.2.1",
"@types/node": "^13.13.5",
"@zeit/ncc": "^0.22.1",
"dotenv": "^8.2.0",
"jest": "^25.5.4",
"jest-circus": "^25.5.4",
"jest-runtime": "^25.5.4",
Expand Down
6 changes: 4 additions & 2 deletions src/installer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as fs from 'fs';
import * as path from 'path';
import * as os from 'os';
import * as util from 'util';
import * as github from './github';
Expand Down Expand Up @@ -26,10 +27,11 @@ export async function getXgo(version: string): Promise<string> {
core.info('🔨 Fixing perms...');
fs.chmodSync(downloadPath, '0755');

const cachePath: string = await tc.cacheFile(downloadPath, osPlat == 'win32' ? 'xgo.exe' : 'xgo', 'ghaction-xgo', semver);
const exeFile: string = osPlat == 'win32' ? 'xgo.exe' : 'xgo';
const cachePath: string = await tc.cacheFile(downloadPath, exeFile, 'ghaction-xgo', semver);
core.debug(`Cached to ${cachePath}`);

return cachePath;
return path.join(cachePath, exeFile);
}

const getFilename = (): string => {
Expand Down

0 comments on commit 7fd7b98

Please sign in to comment.