mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
nix repl: Stop the progress bar
The repl was broken since c3769c6846
. In
general, the progress bar is incompatible with the repl.
This commit is contained in:
parent
9ddef9f0be
commit
0d2163c6dc
@ -35,6 +35,7 @@ extern "C" {
|
|||||||
#include "finally.hh"
|
#include "finally.hh"
|
||||||
#include "markdown.hh"
|
#include "markdown.hh"
|
||||||
#include "local-fs-store.hh"
|
#include "local-fs-store.hh"
|
||||||
|
#include "progress-bar.hh"
|
||||||
|
|
||||||
#if HAVE_BOEHMGC
|
#if HAVE_BOEHMGC
|
||||||
#define GC_INCLUDE_NEW
|
#define GC_INCLUDE_NEW
|
||||||
@ -252,6 +253,10 @@ void NixRepl::mainLoop()
|
|||||||
rl_set_list_possib_func(listPossibleCallback);
|
rl_set_list_possib_func(listPossibleCallback);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Stop the progress bar because it interferes with the display of
|
||||||
|
the repl. */
|
||||||
|
stopProgressBar();
|
||||||
|
|
||||||
std::string input;
|
std::string input;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
@ -1037,9 +1042,10 @@ void runRepl(
|
|||||||
|
|
||||||
struct CmdRepl : InstallablesCommand
|
struct CmdRepl : InstallablesCommand
|
||||||
{
|
{
|
||||||
CmdRepl(){
|
CmdRepl() {
|
||||||
evalSettings.pureEval = false;
|
evalSettings.pureEval = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void prepare()
|
void prepare()
|
||||||
{
|
{
|
||||||
if (!settings.isExperimentalFeatureEnabled(Xp::ReplFlake) && !(file) && this->_installables.size() >= 1) {
|
if (!settings.isExperimentalFeatureEnabled(Xp::ReplFlake) && !(file) && this->_installables.size() >= 1) {
|
||||||
@ -1053,12 +1059,15 @@ struct CmdRepl : InstallablesCommand
|
|||||||
}
|
}
|
||||||
installables = InstallablesCommand::load();
|
installables = InstallablesCommand::load();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> files;
|
std::vector<std::string> files;
|
||||||
|
|
||||||
Strings getDefaultFlakeAttrPaths() override
|
Strings getDefaultFlakeAttrPaths() override
|
||||||
{
|
{
|
||||||
return {""};
|
return {""};
|
||||||
}
|
}
|
||||||
virtual bool useDefaultInstallables() override
|
|
||||||
|
bool useDefaultInstallables() override
|
||||||
{
|
{
|
||||||
return file.has_value() or expr.has_value();
|
return file.has_value() or expr.has_value();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user