fix: avoid use '/' on path.join

This commit is contained in:
Nogic 2023-05-23 23:06:32 +00:00 committed by GitHub
parent 499093f364
commit 39d3726ca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 217 additions and 217 deletions

4
dist/setup/index.js vendored
View File

@ -71299,7 +71299,7 @@ class DotnetCoreInstaller {
]; ];
const scriptName = utils_1.IS_WINDOWS ? 'install-dotnet.ps1' : 'install-dotnet.sh'; const scriptName = utils_1.IS_WINDOWS ? 'install-dotnet.ps1' : 'install-dotnet.sh';
const escapedScript = path_1.default const escapedScript = path_1.default
.join(__dirname, '../..', 'externals', scriptName) .join(__dirname, '..', '..', 'externals', scriptName)
.replace(/'/g, "''"); .replace(/'/g, "''");
let scriptArguments; let scriptArguments;
let scriptPath = ''; let scriptPath = '';
@ -71505,7 +71505,7 @@ function run() {
const cacheDependencyPath = core.getInput('cache-dependency-path'); const cacheDependencyPath = core.getInput('cache-dependency-path');
yield (0, cache_restore_1.restoreCache)(cacheDependencyPath); yield (0, cache_restore_1.restoreCache)(cacheDependencyPath);
} }
const matchersPath = path_1.default.join(__dirname, '../..', '.github'); const matchersPath = path_1.default.join(__dirname, '..', '..', '.github');
core.info(`##[add-matcher]${path_1.default.join(matchersPath, 'csc.json')}`); core.info(`##[add-matcher]${path_1.default.join(matchersPath, 'csc.json')}`);
} }
catch (error) { catch (error) {

View File

@ -188,7 +188,7 @@ export class DotnetCoreInstaller {
]; ];
const scriptName = IS_WINDOWS ? 'install-dotnet.ps1' : 'install-dotnet.sh'; const scriptName = IS_WINDOWS ? 'install-dotnet.ps1' : 'install-dotnet.sh';
const escapedScript = path const escapedScript = path
.join(__dirname, '../..', 'externals', scriptName) .join(__dirname, '..', '..', 'externals', scriptName)
.replace(/'/g, "''"); .replace(/'/g, "''");
let scriptArguments: string[]; let scriptArguments: string[];
let scriptPath = ''; let scriptPath = '';

View File

@ -100,7 +100,7 @@ export async function run() {
await restoreCache(cacheDependencyPath); await restoreCache(cacheDependencyPath);
} }
const matchersPath = path.join(__dirname, '../..', '.github'); const matchersPath = path.join(__dirname, '..', '..', '.github');
core.info(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`); core.info(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`);
} catch (error) { } catch (error) {
core.setFailed(error.message); core.setFailed(error.message);