If the 'source' command fails, fall back to the input
only if in interactive mode. Otherwise exit.
This commit is contained in:
parent
b46dd5effd
commit
c76efd47ed
|
|
@ -1737,7 +1737,10 @@ com_source(wordlist *wl)
|
||||||
#ifdef SHARED_MODULE
|
#ifdef SHARED_MODULE
|
||||||
controlled_exit(1);
|
controlled_exit(1);
|
||||||
#else
|
#else
|
||||||
cp_evloop(NULL);
|
if (cp_getvar("interactive", CP_BOOL, NULL, 0))
|
||||||
|
cp_evloop(NULL);
|
||||||
|
else
|
||||||
|
controlled_exit(1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
while (wl) {
|
while (wl) {
|
||||||
|
|
@ -1752,7 +1755,10 @@ com_source(wordlist *wl)
|
||||||
#ifdef SHARED_MODULE
|
#ifdef SHARED_MODULE
|
||||||
controlled_exit(1);
|
controlled_exit(1);
|
||||||
#else
|
#else
|
||||||
cp_evloop(NULL);
|
if (cp_getvar("interactive", CP_BOOL, NULL, 0))
|
||||||
|
cp_evloop(NULL);
|
||||||
|
else
|
||||||
|
controlled_exit(1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
while ((n = fread(buf, 1, BSIZE_SP, tp)) > 0)
|
while ((n = fread(buf, 1, BSIZE_SP, tp)) > 0)
|
||||||
|
|
@ -1774,7 +1780,10 @@ com_source(wordlist *wl)
|
||||||
#ifdef SHARED_MODULE
|
#ifdef SHARED_MODULE
|
||||||
controlled_exit(1);
|
controlled_exit(1);
|
||||||
#else
|
#else
|
||||||
cp_evloop(NULL);
|
if (cp_getvar("interactive", CP_BOOL, NULL, 0))
|
||||||
|
cp_evloop(NULL);
|
||||||
|
else
|
||||||
|
controlled_exit(1);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue