RejectedSoftware Forums

Sign up

Correct Syntax for remove

I'm stuck. When I type 'dub remove package-name' it asks me to specify which version. Then 'dub remove package-name version' results an error telling me it expects exactly one argument. So I try 'dub remove package-name:version and I'm told that it cannot find the package to remove. What's the secret formula?

Re: Correct Syntax for remove

On Fri, 02 May 2014 09:28:10 GMT, Mike Parker wrote:

I'm stuck. When I type 'dub remove package-name' it asks me to specify which version. Then 'dub remove package-name version' results an error telling me it expects exactly one argument. So I try 'dub remove package-name:version and I'm told that it cannot find the package to remove. What's the secret formula?

It's dub remove ... --version=... - not very pretty, but consistent with other places where --version is used. See also dub remove -h. I'll improve the error message to indicate the proper syntax.

Re: Correct Syntax for remove

On Fri, 02 May 2014 10:11:23 GMT, Sönke Ludwig wrote:

On Fri, 02 May 2014 09:28:10 GMT, Mike Parker wrote:

I'm stuck. When I type 'dub remove package-name' it asks me to specify which version. Then 'dub remove package-name version' results an error telling me it expects exactly one argument. So I try 'dub remove package-name:version and I'm told that it cannot find the package to remove. What's the secret formula?

It's dub remove ... --version=... - not very pretty, but consistent with other places where --version is used. See also dub remove -h. I'll improve the error message to indicate the proper syntax.

As of 7b7ca05, now prints:

Error executing command remove: Please specify a individual version using --version=... or use the wildcard --version=* to remove all versions.

Re: Correct Syntax for remove

On Fri, 02 May 2014 10:19:25 GMT, Sönke Ludwig wrote:

It's dub remove ... --version=... - not very pretty, but consistent with other places where --version is used. See also dub remove -h. I'll improve the error message to indicate the proper syntax.

As of 7b7ca05, now prints:

Error executing command remove: Please specify a individual version using --version=... or use the wildcard --version=* to remove all versions.

I had resorted to going into AppData and deleting things manually. FWIW, in the description of the -h flag, the bit about "command specific help" didn't jump out at me until after I read your post here. dub commands just became much less arcane. Thanks!

Re: Correct Syntax for remove

On Wed, 07 May 2014 13:39:06 GMT, Mike Parker wrote:

(...)
FWIW, in the description of the -h flag, the bit about "command specific help" didn't jump out at me until after I read your post here. dub commands just became much less arcane. Thanks!

I've added an explicit message now whenever a usage error occurs (3ec3c12). This obviously somehow needs to be made more prominent, as a number other people also didn't notice it in the past.