mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 06:33:33 +08:00
POSIX: Throw an error if the startup script is not present
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user