Skip to content

Improve the messaging for the version command

Compare
Choose a tag to compare
@VaporBot VaporBot released this 28 Feb 13:37
· 44 commits to main since this release
8302c18
This patch was authored by @BennyDeBock and released by @0xTim.

When using vapor --version, the output in a non vapor directory would be

# note: no Package.resolved was found.
# framework: not found
# toolbox: 18.3.3

This pr changes those framework and note texts to:

# note: no Package.resolved file was found. Possibly not currently in a Swift package directory
# framework: vapor framework for this project: no Package.resolved file found. Please ensure you are in a Vapor project directory. If you are, ensure you have built the project with 'swift build'. You can create a new project with 'vapor new MyProject'

in projects that have no Package.resolved.
in projects that do have a Package.resolved but that aren't Vapor projects it changes the framework text to:

# framework: vapor framework for this project: this Swift project does not depend on Vapor. Please ensure you are in a Vapor project directory. If you are, ensure you have built the project with 'swift build'. You can create a new project with 'vapor new MyProject'

closes #345