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.

Simple CLI invocation with "default" options

See original GitHub issue

Hi,

Simple CLI commands like droid file.jpg or droid directory/ fail with the error “Incorrect command line syntax: No command line options specified” because some options are not optional at all. Is it just me or wouldn’t one expect that this just works by identifying the given files/directories (recursively) with the latest available (container) signature file? To me this seems like the “default” behavior for quick command line usage.

Personally, I work around this by tweaking your droid.sh file a little so that it accepts a CLI invocation like this. Would you possibly like to add this feature to DROID? In this case I will open a pull request.

Have a nice weekend, Martin

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nishihatapalmercommented, Jan 29, 2021

I’ve now added this to my new command line code. If you don’t specify any other top level arguments, it will default to just identifying files, and output the results to the console by default as CSV:

droid {file1} {file2} etc…

You can still specify other standard options to recurse into folder as normal, or to output to a file:

droid {file1} {folder1} -R -o “/home/user/scans/results.csv”

1reaction
sparkhicommented, Aug 18, 2020

Thanks Martin. My preference would be to do it in the command line and also assess the impact on existing.

You are quite right about being cautious.

Thanks once again for identifying this, we would take it up as per the priorities of existing issues.

Regards, –Saurabh

Read more comments on GitHub >

github_iconTop Results From Across the Web

invoke — AWS CLI 1.27.29 Command Reference
Choose from the following options. RequestResponse (default) – Invoke the function synchronously. Keep the connection open until the function returns a response ...
Read more >
Invocation basics - Invoke documentation - PyInvoke
Invoke's command line invocation utilizes traditional style command-line flags ... Boolean options are simple flags with no arguments, which turn the Python ...
Read more >
gnutls-cli Invocation (GnuTLS 3.7.8)
This is the “inline commands of the form ^<cmd>^” option. Enable inline commands of the form ^<cmd>^. The inline commands are expected to...
Read more >
Options · CLI11 Tutorial
Options. Simple options. The most versatile addition to a command line program ... If you want CLI11 to display your default value, you...
Read more >
picocli - a mighty tiny command line interface
A command may be invoked with the @file argument, like this: ... The simplest way to create a multi-valued option is to declare...
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