--app command with no arguments
See original GitHub issueCDK doesn’t support executing a command with no arguments to run an app. Suppose that “foobar” is an executable in your $PATH
. The following command doesn’t work as expected:
$ cdk --app "foobar" ls
ENOENT: no such file or directory, stat 'foobar'
while the command below works:
$ cdk --app "foobar arg" ls
You can reproduce this behavior with any executable. For instance:
$ cdk --app "cp" ls
and
$ cdk --app "cp /path1 /path2" ls
On the other hand, if the executable doesn’t exist for real, the error is:
/bin/sh: foobar: command not found
Subprocess exited with error 127
The same goes if the “no argument” app is specified in the cdk.json
configuration file instead of the command line.
{
"app": "foobar"
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to run a program with no arguments - bash - Stack Overflow
How to run a program with no arguments · 1. just typing ./a. · @Stefan no, by default the shell passes one argument...
Read more >set command with no arguments - bash - Ask Ubuntu
I happened to issue the command set and it seems to "cat" a script to the console.
Read more >Unix command that takes no arguments [closed]
nologin takes no arguments and is widely available on Linux and BSD. On CentOS 4 and 5, the arch command takes no arguments....
Read more >How can I run an application with command line arguments in ...
Starting in OS X 10.6.2, the open command can pass arguments to the ... "open -a /Applications/Firefox.app --args -P default -no-remote".
Read more >Main() and command-line arguments | Microsoft Learn
The Main method is the entry point of a C# application. (Libraries and services do not require a Main method as an entry...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you @shivlaks. That’s a perfectly fine solution. If possible, please also add a unit test. These things are a little tricky and it’s easy to introduce a regression.
@shivlaks thanks a lot for looking into this. Whatever mimics golang LookPath would do. Using the suggested package the
guessExecutable
function would look something like this: