mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 10:01:13 +09:00
Shell: Do not treat the absence of an init script as an error
This commit is contained in:
parent
e83c36d053
commit
6d17fe38a4
Notes:
sideshowbarker
2024-07-19 05:07:11 +09:00
Author: https://github.com/alimpfard
Commit: 6d17fe38a4
Pull-request: https://github.com/SerenityOS/serenity/pull/2705
3 changed files with 6 additions and 5 deletions
|
@ -499,11 +499,12 @@ RefPtr<Job> Shell::run_command(AST::Command& command)
|
|||
return *job;
|
||||
}
|
||||
|
||||
bool Shell::run_file(const String& filename)
|
||||
bool Shell::run_file(const String& filename, bool explicitly_invoked)
|
||||
{
|
||||
auto file_result = Core::File::open(filename, Core::File::ReadOnly);
|
||||
if (file_result.is_error()) {
|
||||
fprintf(stderr, "Failed to open %s: %s\n", filename.characters(), file_result.error().characters());
|
||||
if (explicitly_invoked)
|
||||
fprintf(stderr, "Failed to open %s: %s\n", filename.characters(), file_result.error().characters());
|
||||
return false;
|
||||
}
|
||||
auto file = file_result.value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue