mirror of
https://github.com/actions/setup-go.git
synced 2025-04-23 17:40:50 +00:00
Fix bug with getting object property by its name
This commit is contained in:
parent
11d8853723
commit
30f08b7b11
3 changed files with 6 additions and 6 deletions
4
dist/cache-save/index.js
vendored
4
dist/cache-save/index.js
vendored
|
@ -3946,10 +3946,10 @@ exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, fu
|
||||||
return stdout.trim();
|
return stdout.trim();
|
||||||
});
|
});
|
||||||
exports.getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
|
exports.getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (!exports.supportedPackageManagers.packageManager) {
|
if (!exports.supportedPackageManagers[packageManager]) {
|
||||||
throw new Error(`It's not possible to use ${packageManager}, please, check correctness of the package manager name spelling.`);
|
throw new Error(`It's not possible to use ${packageManager}, please, check correctness of the package manager name spelling.`);
|
||||||
}
|
}
|
||||||
return exports.supportedPackageManagers.packageManager;
|
return exports.supportedPackageManagers[packageManager];
|
||||||
});
|
});
|
||||||
exports.getCacheDirectoryPath = (packageManagerInfo) => __awaiter(void 0, void 0, void 0, function* () {
|
exports.getCacheDirectoryPath = (packageManagerInfo) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
const stdout = yield exports.getCommandOutput(packageManagerInfo.getCacheFolderCommand);
|
const stdout = yield exports.getCommandOutput(packageManagerInfo.getCacheFolderCommand);
|
||||||
|
|
4
dist/setup/index.js
vendored
4
dist/setup/index.js
vendored
|
@ -4190,10 +4190,10 @@ exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, fu
|
||||||
return stdout.trim();
|
return stdout.trim();
|
||||||
});
|
});
|
||||||
exports.getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
|
exports.getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (!exports.supportedPackageManagers.packageManager) {
|
if (!exports.supportedPackageManagers[packageManager]) {
|
||||||
throw new Error(`It's not possible to use ${packageManager}, please, check correctness of the package manager name spelling.`);
|
throw new Error(`It's not possible to use ${packageManager}, please, check correctness of the package manager name spelling.`);
|
||||||
}
|
}
|
||||||
return exports.supportedPackageManagers.packageManager;
|
return exports.supportedPackageManagers[packageManager];
|
||||||
});
|
});
|
||||||
exports.getCacheDirectoryPath = (packageManagerInfo) => __awaiter(void 0, void 0, void 0, function* () {
|
exports.getCacheDirectoryPath = (packageManagerInfo) => __awaiter(void 0, void 0, void 0, function* () {
|
||||||
const stdout = yield exports.getCommandOutput(packageManagerInfo.getCacheFolderCommand);
|
const stdout = yield exports.getCommandOutput(packageManagerInfo.getCacheFolderCommand);
|
||||||
|
|
|
@ -34,13 +34,13 @@ export const getCommandOutput = async (toolCommand: string) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getPackageManagerInfo = async (packageManager: string) => {
|
export const getPackageManagerInfo = async (packageManager: string) => {
|
||||||
if (!supportedPackageManagers.packageManager) {
|
if (!supportedPackageManagers[packageManager]) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`It's not possible to use ${packageManager}, please, check correctness of the package manager name spelling.`
|
`It's not possible to use ${packageManager}, please, check correctness of the package manager name spelling.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return supportedPackageManagers.packageManager;
|
return supportedPackageManagers[packageManager];
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getCacheDirectoryPath = async (
|
export const getCacheDirectoryPath = async (
|
||||||
|
|
Loading…
Add table
Reference in a new issue