mirror of
https://github.com/imjasonh/gcp-metrics-action
synced 2026-07-18 14:45:47 +00:00
Update lib/config.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
a410dbb4ac
commit
743ca63209
1 changed files with 1 additions and 1 deletions
|
|
@ -307,7 +307,7 @@ async function getConfig() {
|
|||
if (attributesInput) {
|
||||
try {
|
||||
customAttributes = yaml.parse(attributesInput);
|
||||
if (typeof customAttributes !== 'object' || Array.isArray(customAttributes)) {
|
||||
if (customAttributes === null || typeof customAttributes !== 'object' || Array.isArray(customAttributes)) {
|
||||
throw new Error('Attributes must be a YAML object (key: value pairs)');
|
||||
}
|
||||
core.info(`Parsed ${Object.keys(customAttributes).length} custom attribute(s)`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue