WSL/SLF GitLab Repository

Commit 13c71bec authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Now the binary search PATH is printed before each command is executed.

Ideally, it should onyl be printed the first time a command is executed
(this is useful for users who have multiple versions of a binary as it
is the only way to have a chance to figure out which one will be
called). Otherwise, minor constifications in
parent 0281d016
......@@ -544,6 +544,7 @@ bool WorkflowPanel::actionSystemCommand(const QString &command, QPushButton *but
connect(process, &QProcess::readyReadStandardError, this, [=]{ processStandardError(terminal); });
connect(process, &QProcess::errorOccurred, this, [&](const QProcess::ProcessError& error){ processErrorOccured(error, terminal, button); });
terminal->log("\033[3mPATH set to: "+QString::fromLocal8Bit(qgetenv("PATH"))+"\033[0m");
process->start(command); //execute the system command via QProcess
terminal->log(html::bold("$ " + command)); //show what is being run
......@@ -101,7 +101,7 @@ bool workCommandlineArguments(QCommandLineParser *parser)
if (parser->isSet("clear")) {
const QString xml_settings_filename(getSettingsFileName());
std::cout << "Deleting " << xml_settings_filename.toStdString() << "..." << std::endl;
QFile sfile(getSettingsFileName());
QFile sfile( getSettingsFileName() );
if (sfile.error())
std::cerr << "[E] Can't delete settings file: " << sfile.errorString().toStdString() << std::endl;
......@@ -118,7 +118,7 @@ bool workCommandlineArguments(QCommandLineParser *parser)
QFile::copy(":doc/help_dev.xml", QDir::currentPath() + "/help_dev.xml");
if (parser->isSet("print_search_dirs")) {
QStringList search_dirs(getSearchDirs(false)); //without user dirs, settings not ready yet
const QStringList search_dirs( getSearchDirs(false) ); //without user dirs, settings not ready yet
std::cout << "Searching the following directories:" << std::endl;
for (auto &dir: search_dirs)
std::cout << dir.toStdString() << std::endl;
......@@ -236,8 +236,8 @@ void setAppStylesheet(QApplication &app, const command_line_args &cmd_args)
void perform_cmd_ini_operations(const QCommandLineParser &parser, const command_line_args &cmd_args, QStringList &errors)
const QString in_inifile(cmd_args.startup_ini_file);
const QString out_inifile (cmd_args.out_ini_file);
const QString in_inifile( cmd_args.startup_ini_file );
const QString out_inifile( cmd_args.out_ini_file );
if (!out_inifile.isEmpty() && in_inifile.isEmpty()) {
const QString err_msg(
QApplication::tr(R"(To output a file with "-o" you need to specify the input file with "-i")"));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment