mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-08 13:11:11 +00:00
minor fix
This commit is contained in:
parent
2d741fbf57
commit
292688b127
3 changed files with 16 additions and 7 deletions
|
@ -36,6 +36,10 @@ export default abstract class BaseDistribution {
|
|||
toolPath = await this.downloadNodejs(toolName);
|
||||
}
|
||||
|
||||
if (this.osPlat != 'win32') {
|
||||
toolPath = path.join(toolPath, 'bin');
|
||||
}
|
||||
|
||||
core.addPath(toolPath);
|
||||
}
|
||||
|
||||
|
@ -82,10 +86,6 @@ export default abstract class BaseDistribution {
|
|||
let toolPath = await this.extractArchive(downloadPath, info);
|
||||
core.info('Done');
|
||||
|
||||
if (osPlat != 'win32') {
|
||||
toolPath = path.join(toolPath, 'bin');
|
||||
}
|
||||
|
||||
return toolPath;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ import * as core from '@actions/core';
|
|||
import * as tc from '@actions/tool-cache';
|
||||
import * as semver from 'semver';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
|
||||
import {INodeVersion} from '../../installer';
|
||||
import BaseDistribution from '../base-distribution';
|
||||
|
@ -131,6 +132,10 @@ export default class OfficialBuilds extends BaseDistribution {
|
|||
toolPath = await this.downloadNodejs(toolName);
|
||||
}
|
||||
|
||||
if (this.osPlat != 'win32') {
|
||||
toolPath = path.join(toolPath, 'bin');
|
||||
}
|
||||
|
||||
core.addPath(toolPath);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue