Skip to content

Commit

Permalink
Fix undefined in Post-processing
Browse files Browse the repository at this point in the history
  • Loading branch information
socheatsok78 committed Jun 3, 2024
1 parent a09f8ef commit a4d3d0f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 11 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const YAML = require("yaml")
const core = require('@actions/core');
const tc = require('@actions/tool-cache');
const { compareVersions } = require('compare-versions');
const { release } = require("node:os");

const runner = {
os: process.env['RUNNER_OS'] || 'Linux',
Expand All @@ -16,6 +17,7 @@ const parseStrictInput= (strict = "false") => {
}

const labelsMap = {
release: "Flutter SDK release matrix",
dart: "Dart SDK",
flutter: "Flutter SDK",
}
Expand Down Expand Up @@ -136,7 +138,7 @@ async function main() {
core.info(`- Remove the "${key}" from the matrix to avoid empty arrays which will cause the job to fail`)
delete outputs[key]
} else {
if (key !== 'matrix') {
if (key !== 'release') {
core.info("- Removing duplicates and sorting the versions")
outputs[key] = Array
.from(new Set(outputs[key])) // Remove duplicates
Expand Down

0 comments on commit a4d3d0f

Please sign in to comment.