POSIX: Throw an error if the startup script is not present

This commit is contained in:
Lorenz Meier
2015-08-28 10:47:25 +02:00
parent 6927e62e77
commit e30c822068
+5
View File
@@ -96,6 +96,11 @@ int main(int argc, char **argv)
if (argc == 2) {
ifstream infile(argv[1]);
if (!infile) {
cout << "failed opening script" << argv[1] << std::endl;
return 1;
}
for (string line; getline(infile, line, '\n'); ) {
process_line(line);
}