mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-09 08:38:53 +01:00
Do shallow clone to speed-up extension installs
This commit is contained in:
parent
9a647b96df
commit
e082138c18
@ -705,6 +705,8 @@ async function getExtensionVersion(extensionName) {
|
|||||||
export async function installExtension(url) {
|
export async function installExtension(url) {
|
||||||
console.debug('Extension import started', url);
|
console.debug('Extension import started', url);
|
||||||
|
|
||||||
|
toastr.info('Please wait...', 'Importing extension');
|
||||||
|
|
||||||
const request = await fetch('/api/extensions/install', {
|
const request = await fetch('/api/extensions/install', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: getRequestHeaders(),
|
headers: getRequestHeaders(),
|
||||||
|
@ -79,7 +79,7 @@ function registerEndpoints(app, jsonParser) {
|
|||||||
return response.status(409).send(`Directory already exists at ${extensionPath}`);
|
return response.status(409).send(`Directory already exists at ${extensionPath}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
await git.clone(url, extensionPath);
|
await git.clone(url, extensionPath, { '--depth': 1 });
|
||||||
console.log(`Extension has been cloned at ${extensionPath}`);
|
console.log(`Extension has been cloned at ${extensionPath}`);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user