8000 Merge pull request #517 from rentziass/rentziass/update-actions-core · stevelacey/setup-python@13ae5bb · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 13ae5bb

Browse files
Merge pull request actions#517 from rentziass/rentziass/update-actions-core
Update @actions/core to 1.10.0
2 parents 13a464f + 0c4d7b8 commit 13ae5bb

File tree

5 files changed

+81
-51
lines changed

5 files changed

+81
-51
lines changed

.licenses/npm/@actions/core.dep.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cache-save/index.js

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4865,7 +4865,6 @@ const file_command_1 = __nccwpck_require__(717);
48654865
const utils_1 = __nccwpck_require__(5278);
48664866
const os = __importStar(__nccwpck_require__(2037));
48674867
const path = __importStar(__nccwpck_require__(1017));
4868-
const uuid_1 = __nccwpck_require__(8974);
48694868
const oidc_utils_1 = __nccwpck_require__(8041);
48704869
/**
48714870
* The code to exit an action
@@ -4895,20 +4894,9 @@ function exportVariable(name, val) {
48954894
process.env[name] = convertedVal;
48964895
const filePath = process.env['GITHUB_ENV'] || '';
48974896
if (filePath) {
4898-
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
4899-
// These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter.
4900-
if (name.includes(delimiter)) {
4901-
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
4902-
}
4903-
if (convertedVal.includes(delimiter)) {
4904-
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
4905-
}
4906-
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
4907-
file_command_1.issueCommand('ENV', commandValue);
4908-
}
4909-
else {
4910-
command_1.issueCommand('set-env', { name }, convertedVal);
4897+
return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));
49114898
}
4899+
command_1.issueCommand('set-env', { name }, convertedVal);
49124900
}
49134901
exports.exportVariable = exportVariable;
49144902
/**
@@ -4926,7 +4914,7 @@ exports.setSecret = setSecret;
49264914
function addPath(inputPath) {
49274915
const filePath = process.env['GITHUB_PATH'] || '';
49284916
if (filePath) {
4929-
file_command_1.issueCommand('PATH', inputPath);
4917+
file_command_1.issueFileCommand('PATH', inputPath);
49304918
}
49314919
else {
49324920
command_1.issueCommand('add-path', {}, inputPath);
@@ -4966,7 +4954,10 @@ function getMultilineInput(name, options) {
49664954
const inputs = getInput(name, options)
49674955
.split('\n')
49684956
.filter(x => x !== '');
4969-
return inputs;
4957+
if (options && options.trimWhitespace === false) {
4958+
return inputs;
4959+
}
4960+
return inputs.map(input => input.trim());
49704961
}
49714962
exports.getMultilineInput = getMultilineInput;
49724963
/**
@@ -4999,8 +4990,12 @@ exports.getBooleanInput = getBooleanInput;
49994990
*/
50004991
// eslint-disable-next-line @typescript-eslint/no-explicit-any
50014992
function setOutput(name, value) {
4993+
const filePath = process.env['GITHUB_OUTPUT'] || '';
4994+
if (filePath) {
4995+
return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));
4996+
}
50024997
process.stdout.write(os.EOL);
5003-
command_1.issueCommand('set-output', { name }, value);
4998+
command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));
50044999
}
50055000
exports.setOutput = setOutput;
50065001
/**
@@ -5129,7 +5124,11 @@ exports.group = group;
51295124
*/
51305125
// eslint-disable-next-line @typescript-eslint/no-explicit-any
51315126
function saveState(name, value) {
5132-
command_1.issueCommand('save-state', { name }, value);
5127+
const filePath = process.env['GITHUB_STATE'] || '';
5128+
if (filePath) {
5129+
return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));
5130+
}
5131+
command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));
51335132
}
51345133
exports.saveState = saveState;
51355134
/**
@@ -5195,13 +5194,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
51955194
return result;
51965195
};
51975196
Object.defineProperty(exports, "__esModule", ({ value: true }));
5198-
exports.issueCommand = void 0;
5197+
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
51995198
// We use any as a valid input type
52005199
/* eslint-disable @typescript-eslint/no-explicit-any */
52015200
const fs = __importStar(__nccwpck_require__(7147));
52025201
const os = __importStar(__nccwpck_require__(2037));
5202+
const uuid_1 = __nccwpck_require__(8974);
52035203
const utils_1 = __nccwpck_require__(5278);
5204-
function issueCommand(command, message) {
5204+
function issueFileCommand(command, message) {
52055205
const filePath = process.env[`GITHUB_${command}`];
52065206
if (!filePath) {
52075207
throw new Error(`Unable to find environment variable for file command ${command}`);
@@ -5213,7 +5213,22 @@ function issueCommand(command, message) {
52135213
encoding: 'utf8'
52145214
});
52155215
}
5216-
exports.issueCommand = issueCommand;
5216+
exports.issueFileCommand = issueFileCommand;
5217+
function prepareKeyValueMessage(key, value) {
5218+
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
5219+
const convertedValue = utils_1.toCommandValue(value);
5220+
// These should realistically never happen, but just in case someone finds a
5221+
// way to exploit uuid generation let's not allow keys or values that contain
5222+
// the delimiter.
5223+
if (key.includes(delimiter)) {
5224+
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
5225+
}
5226+
if (convertedValue.includes(delimiter)) {
5227+
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
5228+
}
5229+
return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
5230+
}
5231+
exports.prepareKeyValueMessage = prepareKeyValueMessage;
52175232
//# sourceMappingURL=file-command.js.map
52185233

52195234
/***/ }),

dist/setup/index.js

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4865,7 +4865,6 @@ const file_command_1 = __nccwpck_require__(717);
48654865
const utils_1 = __nccwpck_require__(5278);
48664866
const os = __importStar(__nccwpck_require__(2037));
48674867
const path = __importStar(__nccwpck_require__(1017));
4868-
const uuid_1 = __nccwpck_require__(8974);
48694868
const oidc_utils_1 = __nccwpck_require__(8041);
48704869
/**
48714870
* The code to exit an action
@@ -4895,20 +4894,9 @@ function exportVariable(name, val) {
48954894
process.env[name] = convertedVal;
48964895
const filePath = process.env['GITHUB_ENV'] || '';
48974896
if (filePath) {
4898-
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
4899-
// These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter.
4900-
if (name.includes(delimiter)) {
4901-
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
4902-
}
4903-
if (convertedVal.includes(delimiter)) {
4904-
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
4905-
}
4906-
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
4907-
file_command_1.issueCommand('ENV', commandValue);
4908-
}
4909-
else {
4910-
command_1.issueCommand('set-env', { name }, convertedVal);
4897+
return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));
49114898
}
4899+
command_1.issueCommand('set-env', { name }, convertedVal);
49124900
}
49134901
exports.exportVariable = exportVariable;
49144902
/**
@@ -4926,7 +4914,7 @@ exports.setSecret = setSecret;
49264914
function addPath(inputPath) {
49274915
const filePath = process.env['GITHUB_PATH'] || '';
49284916
if (filePath) {
4929-
file_command_1.issueCommand('PATH', inputPath);
4917+
file_command_1.issueFileCommand('PATH', inputPath);
49304918
}
49314919
else {
49324920
command_1.issueCommand('add-path', {}, inputPath);
@@ -4966,7 +4954,10 @@ function getMultilineInput(name, options) {
49664954
const inputs = getInput(name, options)
49674955
.split('\n')
49684956
.filter(x => x !== '');
4969-
return inputs;
4957+
if (options && options.trimWhitespace === false) {
4958+
return inputs;
4959+
}
4960+
return inputs.map(input => input.trim());
49704961
}
49714962
exports.getMultilineInput = getMultilineInput;
49724963
/**
@@ -4999,8 +4990,12 @@ exports.getBooleanInput = getBooleanInput;
49994990
*/
50004991
// eslint-disable-next-line @typescript-eslint/no-explicit-any
50014992
function setOutput(name, value) {
4993+
const filePath = process.env['GITHUB_OUTPUT'] || '';
4994+
if (filePath) {
4995+
return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));
4996+
}
50024997
process.stdout.write(os.EOL);
5003-
command_1.issueCommand('set-output', { name }, value);
4998+
command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));
50044999
}
50055000
exports.setOutput = setOutput;
50065001
/**
@@ -5129,7 +5124,11 @@ exports.group = group;
51295124
*/
51305125
// eslint-disable-next-line @typescript-eslint/no-explicit-any
51315126
function saveState(name, value) {
5132-
command_1.issueCommand('save-state', { name }, value);
5127+
const filePath = process.env['GITHUB_STATE'] || '';
5128+
if (filePath) {
5129+
return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));
5130+
}
5131+
command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));
51335132
}
51345133
exports.saveState = saveState;
51355134
/**
@@ -5195,13 +5194,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
51955194
return result;
51965195
};
51975196
Object.defineProperty(exports, "__esModule", ({ value: true }));
5198-
exports.issueCommand = void 0;
5197+
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
51995198
// We use any as a valid input type
52005199
/* eslint-disable @typescript-eslint/no-explicit-any */
52015200
const fs = __importStar(__nccwpck_require__(7147));
52025201
const os = __importStar(__nccwpck_require__(2037));
5202+
const uuid_1 = __nccwpck_require__(8974);
52035203
const utils_1 = __nccwpck_require__(5278);
5204-
function issueCommand(command, message) {
5204+
function issueFileCommand(command, message) {
52055205
const filePath = process.env[`GITHUB_${command}`];
52065206
if (!filePath) {
52075207
throw new Error(`Unable to find environment variable for file command ${command}`);
@@ -5213,7 +5213,22 @@ function issueCommand(command, message) {
52135213
encoding: 'utf8'
52145214
});
52155215
}
5216-
exports.issueCommand = issueCommand;
5216+
exports.issueFileCommand = issueFileCommand;
5217+
function prepareKeyValueMessage(key, value) {
5218+
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
5219+
const convertedValue = utils_1.toCommandValue(value);
5220+
// These should realistically never happen, but just in case someone finds a
5221+
// way to exploit uuid generation let's not allow keys or values that contain
5222+
// the delimiter.
5223+
if (key.includes(delimiter)) {
5224+
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
5225+
}
5226+
if (convertedValue.includes(delimiter)) {
5227+
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
5228+
}
5229+
return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
5230+
}
5231+
exports.prepareKeyValueMessage = prepareKeyValueMessage;
52175232
//# sourceMappingURL=file-command.js.map
52185233

52195234
/***/ }),

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"license": "MIT",
2525
"dependencies": {
2626
"@actions/cache": "^3.0.4",
27-
"@actions/core": "^1.9.1",
27+
"@actions/core": "^1.10.0",
2828
"@actions/exec": "^1.1.0",
2929
"@actions/glob": "^0.2.0",
3030
"@actions/io": "^1.0.2",

0 commit comments

Comments
 (0)
0