To help us debug your issue please explain:
Conan Version : 1.15.2
OS: Ubuntu 18
Am attempting to set a default user and channel in conanfile.py but they do not seem to take when running both a conan install . or a conan create . Documentation here: https://docs.conan.io/en/latest/reference/conanfile/attributes.html#default-user-default-channel
The install resolves to none/none regardless of whether the property is specified via:
default_channel = "local"
default_user = "potato"
or
@property
def default_channel(self):
return "mydefauluser"
@property
def default_user(self):
return "mydefauluser"
I have tried adding debug logging and invalid syntax to the property func but they do not appear to be called on install or create.
The docs mention For package recipes **working in the user space, with local methods** like conan install . and conan build ., there is no current user/channel. That excludes conan install and conan create
@lasote Could have configuration to set up a default user/channel instead of forcing to pass a reference every time to export-pkg or create?
Seems like it'd be useful. Maybe through an ENV variable or something within the conan config?
For example: make the default $USER/local for local developer builds
Where as CI server would always pass a user/channel for official builds.
We have a feature in mind related to that, a default user and channel, and being able to avoid them (both when printing references and when inputting references). So you could so something like conan install lib/1.0
Most helpful comment
We have a feature in mind related to that, a default user and channel, and being able to avoid them (both when printing references and when inputting references). So you could so something like
conan install lib/1.0