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 PR is based on https://github.com/schollz/croc/pull/684
As I understand the handling of
send.json
in thesend
function, it prints but ignores an error ofutils.GetConfigDir()
. I tried to copy this behavior to thereceive
function:If
utils.GetConfigDir()
fails, the error is printed and returned toreceive
. Though, croc only exits ifc.Bool("remember")
istrue
, because only then, the config file is really needed.This may be related to #681