summaryrefslogtreecommitdiff
path: root/hyprpm/src/core/PluginManager.cpp
diff options
context:
space:
mode:
authorzakk4223 <zakk@rsdio.com>2023-12-30 09:19:53 -0500
committerGitHub <noreply@github.com>2023-12-30 15:19:53 +0100
commit33fe3a2e7fcb84e671bc7b5bc5fabcafb8fc1832 (patch)
tree4ff923298c417c2ced15ff26c5c256997faa054c /hyprpm/src/core/PluginManager.cpp
parent2ad2e1d5f5feaf1b7dd65dc162d16547f6b0b20f (diff)
hyprpm: Make sure we're in git repo before getting new hash (#4303)
Diffstat (limited to 'hyprpm/src/core/PluginManager.cpp')
-rw-r--r--hyprpm/src/core/PluginManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/hyprpm/src/core/PluginManager.cpp b/hyprpm/src/core/PluginManager.cpp
index e28637fd..3c091242 100644
--- a/hyprpm/src/core/PluginManager.cpp
+++ b/hyprpm/src/core/PluginManager.cpp
@@ -550,7 +550,7 @@ bool CPluginManager::updatePlugins(bool forceUpdateAll) {
newrepo.plugins.clear();
execAndGet(
"cd /tmp/hyprpm/update/ && git pull --recurse-submodules && git reset --hard --recurse-submodules"); // repo hash in the state.toml has to match head and not any pin
- std::string repohash = execAndGet("git rev-parse HEAD");
+ std::string repohash = execAndGet("cd /tmp/hyprpm/update && git rev-parse HEAD");
if (repohash.length() > 0)
repohash.pop_back();
newrepo.hash = repohash;
@@ -721,4 +721,4 @@ std::string CPluginManager::headerError(const eHeadersErrors err) {
}
return std::string{Colors::RED} + "✖" + Colors::RESET + " Unknown header error. Please run hyprpm update to fix those.\n";
-} \ No newline at end of file
+}