summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2014-06-20 11:19:38 +0100
committerJosé Fonseca <jfonseca@vmware.com>2014-06-24 16:30:34 +0100
commit3af1243c679a1e9d1dad09520678b5ea0644064e (patch)
treecf92a050e55cea4ebdbe3d86fbce1887f8d62c0b /cli
parenta6e716225a2a181da4b6ddb9d8c31157e33cac9d (diff)
cli: Exit early when script is not found.
Diffstat (limited to 'cli')
-rw-r--r--cli/cli_diff.cpp6
-rw-r--r--cli/cli_diff_images.cpp6
-rw-r--r--cli/cli_diff_state.cpp3
-rw-r--r--cli/cli_resources.cpp3
4 files changed, 1 insertions, 17 deletions
diff --git a/cli/cli_diff.cpp b/cli/cli_diff.cpp
index 76cdce1d..6aec76fd 100644
--- a/cli/cli_diff.cpp
+++ b/cli/cli_diff.cpp
@@ -45,9 +45,6 @@ static void
usage(void)
{
os::String command = find_command();
- if (!command.length()) {
- exit(1);
- }
char *args[4];
args[0] = (char *) "python";
@@ -64,9 +61,6 @@ command(int argc, char *argv[])
int i;
os::String command = find_command();
- if (!command.length()) {
- return 1;
- }
os::String apitracePath = os::getProcessName();
diff --git a/cli/cli_diff_images.cpp b/cli/cli_diff_images.cpp
index ba8df3e9..87678bf0 100644
--- a/cli/cli_diff_images.cpp
+++ b/cli/cli_diff_images.cpp
@@ -45,9 +45,6 @@ static void
usage(void)
{
os::String command = find_command();
- if (!command.length()) {
- exit(1);
- }
char *args[4];
args[0] = (char *) "python";
@@ -64,9 +61,6 @@ command(int argc, char *argv[])
int i;
os::String command = find_command();
- if (!command.length()) {
- return 1;
- }
std::vector<const char *> args;
args.push_back("python");
diff --git a/cli/cli_diff_state.cpp b/cli/cli_diff_state.cpp
index 427d258c..952efa98 100644
--- a/cli/cli_diff_state.cpp
+++ b/cli/cli_diff_state.cpp
@@ -45,9 +45,6 @@ static void
usage(void)
{
os::String command = find_command();
- if (!command.length()) {
- exit(1);
- }
char *args[4];
args[0] = (char *) "python";
diff --git a/cli/cli_resources.cpp b/cli/cli_resources.cpp
index e946c205..4186bd60 100644
--- a/cli/cli_resources.cpp
+++ b/cli/cli_resources.cpp
@@ -194,6 +194,5 @@ findScript(const char *scriptFilename, bool verbose)
#endif
std::cerr << "error: cannot find " << scriptFilename << " script\n";
-
- return "";
+ exit(1);
}