* Install a plugin from a local path
( sourcePath: string, targetPath: string, )
| 855 | * Install a plugin from a local path |
| 856 | */ |
| 857 | async function installFromLocal( |
| 858 | sourcePath: string, |
| 859 | targetPath: string, |
| 860 | ): Promise<void> { |
| 861 | if (!(await pathExists(sourcePath))) { |
| 862 | throw new Error(`Source path does not exist: ${sourcePath}`) |
| 863 | } |
| 864 | |
| 865 | await copyDir(sourcePath, targetPath) |
| 866 | |
| 867 | const gitPath = join(targetPath, '.git') |
| 868 | await rm(gitPath, { recursive: true, force: true }) |
| 869 | } |
| 870 | |
| 871 | /** |
| 872 | * Generate a temporary cache name for a plugin |
no test coverage detected