question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The cmd version prints help text twice

See original GitHub issue

I modified the cmd version’s target framework like this:

<TargetFrameworks>netcoreapp3.1;net6.0;net6.0-windows</TargetFrameworks>

Then I build them with:

dotnet publish -c Release --self-contained true -r win-x64 -p:PublishSingleFile=true -p:IncludeAllContentForSelfExtract=true -o ./publish --framework net6.0-windows

After that, I have two executables. However, when I run sqlstresscmd.exe --help, I got this:

C:\repo\SqlQueryStress\src\publish>sqlstresscmd.exe --help
sqlstresscmd 0.9.14.0
Copyright ©  2006, 2007 Adam Machanic

  -s, --settingsFile    File name of saved session settings

  -d, --dbserver        Database Server

  -t, --threads         Number of threads, default 1

  -i, --input           Path to .sql script to execute

  -x, --xtract          Extract sample.json file to current folder

  -r, --results         Autosave results to specified file

  --help                Display this help screen.

  --version             Display version information.

sqlstresscmd 0.9.14.0
Copyright ©  2006, 2007 Adam Machanic
Check for updates at: https://github.com/ErikEJ/SqlQueryStress
Sample usage:
sqlstresscmd -s saved.json -t 32

  -s, --settingsFile    File name of saved session settings

  -d, --dbserver        Database Server

  -t, --threads         Number of threads, default 1

  -i, --input           Path to .sql script to execute

  -x, --xtract          Extract sample.json file to current folder

  -r, --results         Autosave results to specified file

  --help                Display this help screen.

  --version             Display version information.



C:\repo\SqlQueryStress\src\publish>

It seems that the cmd version prints help text twice. Am I missed anything? Thanks.

Issue Analytics

  • State:closed
  • Created 4 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ErikEJcommented, Jun 3, 2023

I am not at my computer for a couple of days, will check then. Could be a bug in the implementation of the help flow, yes.

0reactions
0x7FFFFFFFFFFFFFFFcommented, Jun 3, 2023

Maybe you have the Net tool install and run both - it looks like the tool is called twice

What do you mean by the “Net tool”? I used Microsoft sysinternals tool procmon to monitor the process sqlstresscmd.exe, and I only found one Process Start and one Process Exit (still with the help info printed twice). So it’s not possible that it was called twice. When you run the command with --help, did you get the help info twice?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Print twice via print command(s) does not work...
I am trying to set up print commands such that the first one prints to pdf and then the operator is asked if...
Read more >
Is there a "standard" format for command line/shell help text?
There is no standard but http://docopt.org/ has created their version of a specification for help text for command line tools.
Read more >
echo
Reference article for the echo command, which displays messages or turns on or off the command echoing feature.
Read more >
Printing - Java Programming MOOC
In the example below, the command System. out. println appears twice, which means that two print commands are being executed in the program....
Read more >
Command-Line Printing and Options
CUPS understands many different types of files directly, including text, ... Both the lp and lpr commands support printing from the standard input:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found