Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Error if no packs in pack folder on draft create #939

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thatarchguy
Copy link

For new users, forgetting to run draft init is not as obvious as it should be. This PR throws an error if the packs directory is empty when running draft create, which is normally caused by not running draft init first.

Fixes: https://github.com/Azure/draft/issues/925

Before:

$ draft create
--> Draft detected Go (100.000000%)
--> Could not find a pack for Go. Trying to find the next likely language match...
Error: no languages were detected

After:

$ draft create
Error: No packs found in /home/klaw/.draft/packs, did you `draft init`?

Signed-off-by: Kevin <kevin@stealsyour.pw>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Draft create should check for draft init
1 participant