fsprojects / ProjectScaffold

A prototypical .NET solution (file system layout and tooling), recommended for F# projects
http://fsprojects.github.io/ProjectScaffold
The Unlicense
515 stars 154 forks source link

Add git.exe requirement to documentation and give better error message if not found #262

Open MatthiasWeiser opened 7 years ago

MatthiasWeiser commented 7 years ago

Description

Scaffold fails if git.exe is not in %PATH%

Repro steps

Use a machine without git.exe in %PATH%. I use the VS Plugin plus github for Windows, but both seem no to touch %PATH.

git.exe remote -v git.exe init FsiEvaluationException:

'Error: System.Exception: Start of process git.exe failed. Das System kann die angegebene Datei nicht finden bei Fake.ProcessHelper.ExecProcessWithLambdas@79-16.Invoke(String message) in C:\code\fake\src\app\FakeLib\ProcessHelper.fs:Zeile 79. bei Fake.ProcessHelper.ExecProcessWithLambdas(FSharpFunc2 configProcessStartInfoF, TimeSpan timeOut, Boolean silent, FSharpFunc2 errorF, FSharpFunc2 messageF) in C:\code\fake\src\app\FakeLib\ProcessHelper.fs:Zeile 79. bei Fake.ProcessHelper.ExecProcessAndReturnMessages(FSharpFunc2 configProcessStartInfoF, TimeSpan timeOut) in C:\code\fake\src\app\FakeLib\ProcessHelper.fs:Zeile 106. bei Fake.Git.CommandHelper.runGitCommand(String repositoryDir, String command) in C:\code\fake\src\app\FakeLib\Git\CommandHelper.fs:Zeile 28. bei Fake.Git.CommandHelper.gitCommand(String repositoryDir, String command) in C:\code\fake\src\app\FakeLib\Git\CommandHelper.fs:Zeile 60. bei Fake.Git.Repository.init(String repositoryDir, Boolean bare, Boolean shared) in C:\code\fake\src\app\FakeLib\Git\Repository.fs:Zeile 40. bei <StartupCode$FSI_0005>.$FSI_0005_Init$fsx.main@() in C:\Users\Dell\Documents\GitHub\Ardmore\Shadow\init.fsx:Zeile 236. Stopped due to error'

Expected behavior

ProjectScaffold succeeds

Actual behavior

See error above

Known workarounds

Not known

Related information

See above

forki commented 7 years ago

please install git and put it in path.

MatthiasWeiser commented 7 years ago

Would be nice if this is at least mentioned as a requirement for using ProjectScaffold.

cloudRoutine commented 7 years ago

It could also have a better error message

forki commented 7 years ago

changed title and made it up-for-grabs