Skip to content
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

Gracefully handle non existend receive config file #685

Merged
merged 2 commits into from
Mar 31, 2024

Conversation

a1lu
Copy link
Contributor

@a1lu a1lu commented Mar 30, 2024

This PR is based on #684

As I understand the handling of send.json in the send function, it prints but ignores an error of utils.GetConfigDir(). I tried to copy this behavior to the receive function:

If utils.GetConfigDir() fails, the error is printed and returned to receive. Though, croc only exits if c.Bool("remember") is true, because only then, the config file is really needed.

This may be related to #681

a1lu added 2 commits March 30, 2024 23:24
If croc shall not remember the config, it should not exit if the config
file could not be opened. This is similar to the handling of the send
config.
@schollz
Copy link
Owner

schollz commented Mar 31, 2024

thanks, this looks great!

@schollz schollz merged commit 8b4ab4c into schollz:main Mar 31, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants