Closed swift-ci closed 7 years ago
Using the development snapshot of 15 december on Ubuntu 16.04;
bouke@ubuntu-imac:~/Developer/HAP$ which git
bouke@ubuntu-imac:~/Developer/HAP$ git
The program 'git' is currently not installed. You can install it by typing:
sudo apt install git
bouke@ubuntu-imac:~/Developer/HAP$ swift build
Fetching https://github.com/Bouke/CLibSodium.git
git clone --bare https://github.com/Bouke/CLibSodium.git /media/sf_Developer/HAP/.build/repositories/CLibSodium.git--9212624310367625262
error: Failed to clone https://github.com/Bouke/CLibSodium.git to <AbsolutePath:"/media/sf_Developer/HAP/.build/repositories/CLibSodium.git--9212624310367625262">
So, no longer a crash, but improved diagnostics would be welcome.
Hey scoot (JIRA User), I was looking for some relatively self-contained bugs to get into the swiftpm code base. Saw that it no longer crashed and verified with the 3.1 and master branch what it was doing - but wasn't sure what "improved diagnostics" you were thinking about.
I thought "If git doesn't exist on the local system, fail out early and report that..." as a first order cut of something useful, but did you have something else in mind?
Right now we don't report what error actually occurred when we fail to clone, I think fixing that problem will fix this issue.
See: https://github.com/apple/swift-package-manager/blob/master/Sources/SourceControl/GitRepository.swift#L62
Environment
Swift version 3.0 (swift-3.0-RELEASE) Target: x86_64-unknown-linux-gnuAdditional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Package Manager | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 695fa998c110daea59a7f5c65a9ca3e6is duplicated by:
Issue Description:
I noticed following crash when there is no 'git' command in the system.