hellojoshhhy
hellojoshhhy

Reputation: 958

Fabric fab -f : Can't find any collection named 'fabfile'

After updated Fabric from 1.4 to 2.4, fab -f <file_path>.<fabfile>.py isn't working anymore. It always throws the error Can't find any collection named 'fabfile'!

From fab --help, it stated that -f option is used to -f STRING, --config=STRING Runtime configuration file to use.

Thinking to downgrade it to 1.4 since all my project on other hosts are running this version. But i cant't get back the 1.4 installer on net. Anyone could help on this or any workaround for fabric 2.4 ?

Upvotes: 5

Views: 8951

Answers (1)

Peshmerge
Peshmerge

Reputation: 1060

This is indeed changed! Now with newer version of Fabric 2.x you must use -r instead of -f. This is based on pyinvoke check this link pyInvoke

For example: if you are in dir A and your fabfile is in dir B

dir A
|__dir B

you will be able to call your fabfile tasks by executing this command from the command-line

fab -r ./b/ yourTaskName 

Upvotes: 11

Related Questions