Make an error message more helpful

When we see somebody trying to use a command with spaces, we
should be helpful and point out how to do what they want to do.
tingping/wmclass
Matthias Clasen 2016-06-03 09:22:21 -04:00
parent a512da2592
commit 6d1837ce4b
1 changed files with 7 additions and 1 deletions

View File

@ -1632,8 +1632,14 @@ builder_manifest_finish (BuilderManifest *self,
if (!g_file_query_exists (bin_command, NULL))
{
const char *help = "";
if (strchr (self->command, ' '))
help = ". Use a shell wrapper for passing arguments";
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Command '%s' not found", self->command);
"Command '%s' not found%s", self->command, help);
return FALSE;
}
}