Check if git repo root in plugin update
| @@ -8,7 +8,7 @@ import path from 'node:path'; | ||
| 8 | 8 | import process from 'node:process'; |
| 9 | 9 | import { fileURLToPath } from 'node:url'; |
| 10 | 10 | |
| 11 | 11 | import { default as git, CheckRepoActions } from 'simple-git'; |
| 12 | 12 | import { color } from './src/util.js'; |
| 13 | 13 | |
| 14 | 14 | const __dirname = import.meta.dirname ?? path.dirname(fileURLToPath(import.meta.url)); |
| @@ -49,7 +49,7 @@ async function updatePlugins() { | ||
| 49 | 49 | const pluginPath = path.join(pluginsPath, directory); |
| 50 | 50 | const pluginRepo = git(pluginPath); |
| 51 | 51 | |
| 52 | 52 | const isRepo = await pluginRepo.checkIsRepo(CheckRepoActions.IS_REPO_ROOT); |
| 53 | 53 | if (!isRepo) { |
| 54 | 54 | console.log(`Directory ${color.yellow(directory)} is not a Git repository`); |
| 55 | 55 | continue; |
| @@ -3,7 +3,7 @@ import path from 'node:path'; | ||
| 3 | 3 | import url from 'node:url'; |
| 4 | 4 | |
| 5 | 5 | import express from 'express'; |
| 6 | 6 | import { default as git, CheckRepoActions } from 'simple-git'; |
| 7 | 7 | import { sync as commandExistsSync } from 'command-exists'; |
| 8 | 8 | import { getConfigValue, color } from './util.js'; |
| 9 | 9 | |
| @@ -256,7 +256,7 @@ async function updatePlugins(pluginsPath) { | ||
| 256 | 256 | const pluginPath = path.join(pluginsPath, directory); |
| 257 | 257 | const pluginRepo = git(pluginPath); |
| 258 | 258 | |
| 259 | 259 | const isRepo = await pluginRepo.checkIsRepo(CheckRepoActions.IS_REPO_ROOT); |
| 260 | 260 | if (!isRepo) { |
| 261 | 261 | continue; |
| 262 | 262 | } |