Closed CasvalDOT closed 3 years ago
I agree with the solution, telling the user to run the command isn't wrong and this fix is not adding too much overhead to the UX of the CLI. Or maybe we can do an exception on auto sync when the first command that the user runs is the sync command. Do we have this kind of info inside the root command to manage this exception?
I've fix the problem changing the logic of init function. Now the init function use a steps logic. the steps are an array of functions to execute. Furthermore, init function accept an additional integer argument called steps. If steps is -1 the init function execute all steps of the initialization, otherwise execute each step <= of the value provided.
Ok, it seems a better logic!
If you have the folder
config.hssh.d
empty, and you runhssh s
the sync command run twice, because the system first perform the automatic sync (it occurred when the folder is empty) and then execute the sync command. Maybe the best way to resolve this problem is to disable the automatic sync and notify the user to run the sync command manually