Skip to content

Commit

Permalink
Make LCompilers CLI check if source file exists (lcompilers#1531)
Browse files Browse the repository at this point in the history
  • Loading branch information
faze-geek authored Feb 26, 2023
1 parent d66b71f commit 43fb43a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/bin/lpython.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,9 @@ int main(int argc, char *argv[])
// TODO: for now we ignore the other filenames, only handle
// the first:
std::string arg_file = arg_files[0];
if (CLI::NonexistentPath(arg_file).empty()){
throw LCompilers::LCompilersException("No such file or directory: " + arg_file);
}

std::string outfile;
std::string basename;
Expand Down

0 comments on commit 43fb43a

Please sign in to comment.