From 8336e7b01c2091fe8c278d5e30bf5da455fd54b6 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Fri, 31 May 2024 03:02:12 -0400 Subject: [PATCH] fix --- selfdrive/ui/qt/text.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/selfdrive/ui/qt/text.cc b/selfdrive/ui/qt/text.cc index 54f138557a..24bfcd2540 100644 --- a/selfdrive/ui/qt/text.cc +++ b/selfdrive/ui/qt/text.cc @@ -45,12 +45,13 @@ int main(int argc, char *argv[]) { QObject::connect(update_btn, &QPushButton::clicked, [=, &watcher, &btn]() { btn->setEnabled(false); const std::string git_branch = Params().get("GitBranch"); - const std::string cmd1 = "git remote add origin-update " + Params().get("GitRemote"); - const std::string cmd2 = "git fetch origin-update " + git_branch; - const std::string cmd3 = "git reset --hard origin-update/" + git_branch; + const std::string cmd1 = "git remote remove origin-update"; + const std::string cmd2 = "git remote add origin-update " + Params().get("GitRemote"); + const std::string cmd3 = "git fetch origin-update " + git_branch; + const std::string cmd4 = "git reset --hard origin-update/" + git_branch; QFuture future = QtConcurrent::run([=]() { - std::system(("cd /data/openpilot && " + cmd1 + " && " + cmd2 + " && " + cmd3).c_str()); + std::system(("cd /data/openpilot && " + cmd1 + " && " + cmd2 + " && " + cmd3 + " && " cmd4).c_str()); }); QObject::connect(&watcher, &QFutureWatcher::finished, [btn]() { btn->setEnabled(true);