I was testing Syncthing 2.0 (rc16) together with “Syncthing Windows Setup”, and stumbled upon an error message. It turns out Bill uses the command syncthing.exe generate --skip-port-probing --home= to create a config.xml in the case of a new install.
However, with syncthing 2.0.0-rc.16 you get the following error message:
syncthing.exe: error: unknown flag --skip-port-probing
Apparently, yes. (I mean, I did it, I just didn’t remember).
% syncthing generate --help
Usage: syncthing generate [flags]
Generate key and config, then exit
Flags:
-h, --help Show context-sensitive help.
-C, --config=PATH Set configuration directory (config and keys) ($STCONFDIR)
-D, --data=PATH Set data directory (database and logs) ($STDATADIR)
-H, --home=PATH Set configuration and data directory ($STHOMEDIR)
--gui-user=STRING Specify new GUI authentication user name
--gui-password=STRING Specify new GUI authentication password (use - to read from standard input)
--no-port-probing Don't try to find free ports for GUI and listen addresses on first startup ($STNOPORTPROBING)
I think this is a carryover from the main serve command where we already had numerous --no-whatever but no --skip-whatevers.
I thin running syncthing version and getting an error back is a fine indicator that it’s not a v2 build, but if that irks you I’m sure you can match on something in the --help output.
I’m just an end-user, not trying to write a wrapper or anything, but can you re-consider making syncthing --version work with 2.0 (in addition to syncthing version)? It’s kind of a standard for many/most CLI apps, along with --help, and I quite often type it (in general, maybe not with syncthing specifically) to find out the version of something.