1
0
Fork 0
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:
Jason Hall 2025-11-12 12:04:17 -05:00 committed by GitHub
parent a410dbb4ac
commit 743ca63209
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)`);