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) {
|
||||
console.debug('Extension import started', url);
|
||||
|
||||
toastr.info('Please wait...', 'Importing extension');
|
||||
|
||||
const request = await fetch('/api/extensions/install', {
|
||||
method: 'POST',
|
||||
headers: getRequestHeaders(),
|
||||
|
|
|
@ -79,7 +79,7 @@ function registerEndpoints(app, jsonParser) {
|
|||
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}`);
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue