(file pluginFile)
| 116 | } |
| 117 | |
| 118 | func shadowCopyPlugin(file pluginFile) (string, error) { |
| 119 | dir, errDir := shadowPluginDir() |
| 120 | if errDir != nil { |
| 121 | return "", errDir |
| 122 | } |
| 123 | shadowPluginCleanupOnce.Do(func() { |
| 124 | removeStaleShadowPlugins(dir) |
| 125 | }) |
| 126 | return shadowCopyPluginToDir(file, dir) |
| 127 | } |
| 128 | |
| 129 | func shadowCopyPluginToDir(file pluginFile, dir string) (string, error) { |
| 130 | source := filepath.Clean(file.Path) |
no test coverage detected