mirror of
https://code.forgejo.org/actions/setup-go.git
synced 2024-11-05 19:45:49 +00:00
lint
This commit is contained in:
parent
75899f8cdf
commit
3e014ec8a4
2 changed files with 4 additions and 2 deletions
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -1308,7 +1308,7 @@ function run() {
|
||||||
console.log('Added go to the path');
|
console.log('Added go to the path');
|
||||||
// if the global installed bin wasn't added,
|
// if the global installed bin wasn't added,
|
||||||
// we can add the bin just installed
|
// we can add the bin just installed
|
||||||
if (!addBinToPath) {
|
if (!addedBin) {
|
||||||
addBinToPath();
|
addBinToPath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1331,8 +1331,10 @@ function addBinToPath() {
|
||||||
let buf = cp.execSync('go env GOPATH');
|
let buf = cp.execSync('go env GOPATH');
|
||||||
if (buf) {
|
if (buf) {
|
||||||
let d = buf.toString().trim();
|
let d = buf.toString().trim();
|
||||||
|
core.debug(`go env GOPATH: ${d}`);
|
||||||
let bp = path.join(d, 'bin');
|
let bp = path.join(d, 'bin');
|
||||||
if (fs.existsSync(bp)) {
|
if (fs.existsSync(bp)) {
|
||||||
|
core.debug(`${bp} exists`);
|
||||||
core.addPath(bp);
|
core.addPath(bp);
|
||||||
added = true;
|
added = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ function addBinToPath(): boolean {
|
||||||
let d = buf.toString().trim();
|
let d = buf.toString().trim();
|
||||||
core.debug(`go env GOPATH: ${d}`);
|
core.debug(`go env GOPATH: ${d}`);
|
||||||
let bp = path.join(d, 'bin');
|
let bp = path.join(d, 'bin');
|
||||||
|
|
||||||
if (fs.existsSync(bp)) {
|
if (fs.existsSync(bp)) {
|
||||||
core.debug(`${bp} exists`);
|
core.debug(`${bp} exists`);
|
||||||
core.addPath(bp);
|
core.addPath(bp);
|
||||||
|
|
Loading…
Reference in a new issue