Closed JakobChristensen closed 8 years ago
Proposed fix: Let scc.cmd search for the appropriate scc.exe.
Search priority:
Fixed. scc.cmd now looks like this:
@echo off
setlocal
set "scc_exe=scc.exe"
if exist "%~dp0\sitecore.tools\scc.exe" (
set "scc_exe=%~dp0\sitecore.tools\scc.exe"
)
if exist "%~dp0\node_modules\sitecore-pathfinder\scc.exe" (
set "scc_exe=%~dp0\node_modules\sitecore-pathfinder\scc.exe"
)
"%scc_exe%" %*
When setting up a new project I understand why you create the scc.cmd file in the root of the project. However, this script points to the location of the executable that was used to setup the project. The path to this executable can and will be different from machine to machine. If the first developer checked the file into source control, others would not be able to use it. Instead, I think we should assume scc.exe is on the path. Distributing Pathfinder via chocolatey should help with that. This is the way I use NuGet which in many ways is quite similar to Pathfinder. When installing Pathfinder through NuGet and having the tool local to the project, then having the scc.cmd file would not be an issue, as long as it’s using a relative path to the executable.