Cannot specify "." current directory as buildpack path
Can successfully create-buildpack from the parent folder:
$ cf create-buildpack my my-buildpack 10
Creating buildpack my...
OK
Uploading buildpack my...
OK
But if we run create-buildpack within the buildpack folder it fails:
$ cd my-buildpack/
my-buildpack$ cf create-buildpack my2 . 10
Creating buildpack my2...
OK
Uploading buildpack my2...
FAILED
Server error, status code: 400, error code: 290002, message: The buildpack upload is invalid: only zip files allowed
Perhaps the CLI does not resolve the provided path to an absolute path first?
We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/74740824.
@drnic Thanks for the report. We'll add this as a confirmed bug to the CLI tracker.
Thanks, @DanLavine and @dliebreich CF Community Pair
I don't believe you should able to specify directories only files. The fix may be to remove the directory input.
Fairly confident that @drnic is correct -- we treat it like a path (either absolute or relative). The fix to support this would be to use filepath.Abs(userSuppliedPath). Seems pretty straightforward.
Might be worth investigating how many other places in the cli we allow users to supply paths that won't work if a user supplies a path like this.
Issue resolved & story accepted.
± |master ✓| → cf create-buildpack greg-buildpack1 . 8 --disable
Creating buildpack greg-buildpack1...
OK
Uploading buildpack greg-buildpack1...
Done uploading
OK
On edge now. Will be in 6.8.0