Check if git repo root in plugin update

8ad7b5dcc58465135ae5c8b7ed522280c892cd65

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +4 -4Ignore whitespace
plugins.js+2 -2
@@ -8,7 +8,7 @@ import path from 'node:path';
88import process from 'node:process';
99import { fileURLToPath } from 'node:url';
1010
1111import { default as git, CheckRepoActions } from 'simple-git';
1212import { color } from './src/util.js';
1313
1414const __dirname = import.meta.dirname ?? path.dirname(fileURLToPath(import.meta.url));
@@ -49,7 +49,7 @@ async function updatePlugins() {
4949 const pluginPath = path.join(pluginsPath, directory);
5050 const pluginRepo = git(pluginPath);
5151
5252 const isRepo = await pluginRepo.checkIsRepo(CheckRepoActions.IS_REPO_ROOT);
5353 if (!isRepo) {
5454 console.log(`Directory ${color.yellow(directory)} is not a Git repository`);
5555 continue;
src/plugin-loader.js+2 -2
@@ -3,7 +3,7 @@ import path from 'node:path';
33import url from 'node:url';
44
55import express from 'express';
66import { default as git, CheckRepoActions } from 'simple-git';
77import { sync as commandExistsSync } from 'command-exists';
88import { getConfigValue, color } from './util.js';
99
@@ -256,7 +256,7 @@ async function updatePlugins(pluginsPath) {
256256 const pluginPath = path.join(pluginsPath, directory);
257257 const pluginRepo = git(pluginPath);
258258
259259 const isRepo = await pluginRepo.checkIsRepo(CheckRepoActions.IS_REPO_ROOT);
260260 if (!isRepo) {
261261 continue;
262262 }