Skip to content

fix: add check before remove output.img and add debug output #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

meteyou
Copy link
Contributor

@meteyou meteyou commented Feb 12, 2025

This PR introduces a conditional check before attempting to remove output.img, along with a corresponding warning message. This change prevents unnecessary error logs when the file doesn't exist. The issue was a minor annoyance in my GitHub workflow logs, and this fix ensures a cleaner output.

FYI: I hadn't tested it with log, because I only tested it in my GitHub workflow and there is no output.img. I can just add a step to create a file, if needed.

Copy link
Member

@foosel foosel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point!

But I think we don't really need a warming here, so just something like

[ -f "output.img" ] && rm -f "output.img"

would be even better (and actually reflect what I intended there 😅)

@meteyou meteyou force-pushed the fix/fix-error-message-rm-output.img branch from 1431c5d to caf38a5 Compare February 12, 2025 21:51
@meteyou
Copy link
Contributor Author

meteyou commented Feb 12, 2025

Thanks for the feedback! no problem, I have updated the PR.

@foosel foosel merged commit 3c43a3a into OctoPrint:main Feb 13, 2025
@meteyou meteyou deleted the fix/fix-error-message-rm-output.img branch April 1, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants