mirror of
https://gitea.com/actions/setup-node.git
synced 2025-09-14 07:38:30 +08:00
minor fix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user