Skip to content

Commit b9edc57

Browse files
author
Amelia Wattenbeger
committed
switch from git diff to git status
to handle new files
1 parent 9ae54d8 commit b9edc57

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15078,7 +15078,7 @@ var main = async () => {
1507815078
const outputFile = core.getInput("output_file") || "./diagram.svg";
1507915079
await import_fs2.default.writeFileSync(outputFile, componentCodeString);
1508015080
await (0, import_exec.exec)("git", ["add", outputFile]);
15081-
const diff = await (0, import_exec.exec)("git", ["diff", outputFile]);
15081+
const diff = await (0, import_exec.exec)("git", ["status", "--porcelain", outputFile]);
1508215082
core.info(`diff: ${diff}`);
1508315083
if (!diff) {
1508415084
core.info("[INFO] No changes to the repo detected, exiting");

src/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const main = async () => {
3030
await fs.writeFileSync(outputFile, componentCodeString)
3131

3232
await exec('git', ['add', outputFile])
33-
const diff = await exec('git', ['diff', outputFile])
33+
const diff = await exec('git', ['status', '--porcelain', outputFile])
3434
core.info(`diff: ${diff}`)
3535
if (!diff) {
3636
core.info('[INFO] No changes to the repo detected, exiting')

0 commit comments

Comments
 (0)