Skip to content

Commit

Permalink
Merge pull request #51 from crazy-max/fix-outputs
Browse files Browse the repository at this point in the history
Don't set outputs if empty or nil
  • Loading branch information
crazy-max committed Sep 24, 2021
2 parents 68e5c3e + 6bbb102 commit 0496f17
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion dist/index.js

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

6 changes: 5 additions & 1 deletion src/buildx.ts
Expand Up @@ -14,7 +14,11 @@ export async function getMetadata(): Promise<string | undefined> {
if (!fs.existsSync(metadataFile)) {
return undefined;
}
return fs.readFileSync(metadataFile, {encoding: 'utf-8'});
const content = fs.readFileSync(metadataFile, {encoding: 'utf-8'}).trim();
if (content === 'null') {
return undefined;
}
return content;
}

export async function isAvailable(): Promise<Boolean> {
Expand Down

0 comments on commit 0496f17

Please sign in to comment.