swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.75k stars 1.35k forks source link

[SR-14462] SwiftPM lacks a friendly error message when run in bad directory. #4439

Open PeterAdams-A opened 3 years ago

PeterAdams-A commented 3 years ago
Previous ID SR-14462
Radar rdar://problem/76455248
Original Reporter @PeterAdams-A
Type Bug
Environment 1. Swift Nightly Docker Image \# 2. Tag: swift-DEVELOPMENT-SNAPSHOT-2021-03-25-a \#
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Package Manager | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 93de08228555b9d558ee300ed02eccef

Issue Description:

I foolishly tried creating a swift package in the root of my file system. Yes this is obviously a stupid thing to do but the error message could have been more helpful than `Illegal instruction`

root@d902e6e703ca:/# swift package init --type executable
Creating executable package: /
Creating Package.swift
Creating README.md
Creating .gitignore
Creating Sources/
Creating Sources/main.swift
Creating Tests/
Illegal instruction

typesanitizer commented 3 years ago

@swift-ci create