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