mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
HackStudio: set sane $PATH early to include /usr/local/bin
Launching from the terminal inherits $PATH which includes /usr/local/bin, but launching from the system menubar doesn't, so HackStudio wasn't finding make installed from ports.
This commit is contained in:
parent
5c25983844
commit
d063a4ccf3
Notes:
sideshowbarker
2024-07-19 10:01:59 +09:00
Author: https://github.com/jcs
Commit: d063a4ccf3
Pull-request: https://github.com/SerenityOS/serenity/pull/1084
2 changed files with 8 additions and 1 deletions
|
@ -105,7 +105,6 @@ void TerminalWrapper::run_command(const String& command)
|
||||||
}
|
}
|
||||||
|
|
||||||
setenv("TERM", "xterm", true);
|
setenv("TERM", "xterm", true);
|
||||||
setenv("PATH", "/bin:/usr/bin:/usr/local/bin", true);
|
|
||||||
|
|
||||||
auto parts = command.split(' ');
|
auto parts = command.split(' ');
|
||||||
ASSERT(!parts.is_empty());
|
ASSERT(!parts.is_empty());
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include "TerminalWrapper.h"
|
#include "TerminalWrapper.h"
|
||||||
#include "WidgetTool.h"
|
#include "WidgetTool.h"
|
||||||
#include "WidgetTreeModel.h"
|
#include "WidgetTreeModel.h"
|
||||||
|
#include <AK/StringBuilder.h>
|
||||||
#include <LibCore/CFile.h>
|
#include <LibCore/CFile.h>
|
||||||
#include <LibGUI/GAboutDialog.h>
|
#include <LibGUI/GAboutDialog.h>
|
||||||
#include <LibGUI/GAction.h>
|
#include <LibGUI/GAction.h>
|
||||||
|
@ -121,6 +122,13 @@ int main(int argc, char** argv)
|
||||||
widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
|
widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
|
||||||
widget->layout()->set_spacing(0);
|
widget->layout()->set_spacing(0);
|
||||||
|
|
||||||
|
StringBuilder path;
|
||||||
|
path.append(getenv("PATH"));
|
||||||
|
if (path.length())
|
||||||
|
path.append(":");
|
||||||
|
path.append("/bin:/usr/bin:/usr/local/bin");
|
||||||
|
setenv("PATH", path.to_string().characters(), true);
|
||||||
|
|
||||||
if (!make_is_available())
|
if (!make_is_available())
|
||||||
GMessageBox::show("The 'make' command is not available. You probably want to install the binutils, gcc, and make ports from the root of the Serenity repository.", "Error", GMessageBox::Type::Error, GMessageBox::InputType::OK, g_window);
|
GMessageBox::show("The 'make' command is not available. You probably want to install the binutils, gcc, and make ports from the root of the Serenity repository.", "Error", GMessageBox::Type::Error, GMessageBox::InputType::OK, g_window);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue