mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 19:52:44 +00:00
When run() returns an error, print the error message also in
non-interactive mode. Previously error messages were printed only in interactive mode. PR: bin/124517 Approved by: trasz (mentor) MFC after: 1 month
This commit is contained in:
parent
a57795536a
commit
6e7b6303ba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197833
@ -241,7 +241,7 @@ int main (int argc, char **argv)
|
||||
|
||||
if (argc > 0) {
|
||||
char buf[80], *p;
|
||||
int len;
|
||||
int len, rc;
|
||||
|
||||
for (p=buf; argc-->0; ++argv) {
|
||||
len = strlen (*argv);
|
||||
@ -257,7 +257,11 @@ int main (int argc, char **argv)
|
||||
}
|
||||
*p = 0;
|
||||
arg = parse (buf, &cmd);
|
||||
return (run (cmd, arg));
|
||||
rc = run (cmd, arg);
|
||||
if (rc < 0 && verbose)
|
||||
warn(NULL);
|
||||
|
||||
return (rc);
|
||||
}
|
||||
|
||||
if (verbose == 1)
|
||||
|
Loading…
Reference in New Issue
Block a user