Skip to content

Commit

Permalink
nixd: fix output of --version (#259)
Browse files Browse the repository at this point in the history
Fixes: #233
  • Loading branch information
inclyc authored Sep 19, 2023
2 parents 69b533e + 57b9dbd commit 5aa1337
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nixd/tools/nixd/nixd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ opt<NSS> Role{"role", desc("The role of this process, worker, controller, ..."),

int main(int argc, char *argv[]) {
using namespace lspserver;
SetVersionPrinter([](llvm::raw_ostream &OS) {
OS << "nixd, version: ";
#ifdef NIXD_VCS_TAG
OS << NIXD_VCS_TAG;
#else
OS << NIXD_VERSION;
#endif
OS << "\n";
});
nixd::registerSigHanlder();
const char *FlagsEnvVar = "NIXD_FLAGS";
HideUnrelatedOptions(NixdCatogories);
Expand Down

0 comments on commit 5aa1337

Please sign in to comment.