alire
alire copied to clipboard
Disallow identifiers starting with dots
I noticed that it is possible to create a crate with a name starting with .
:
$ alr init --bin .dot
Alire needs some user information to initialize the crate author and maintainer,
...
✓ .dot initialized successfully.
$ cd .dot
$ alr printenv
ⓘ Synchronizing workspace...
Nothing to update.
export .DOT_ALIRE_PREFIX="/tmp/.dot"
export ALIRE="True"
...
This leads to an error when trying to export the environment:
$ eval $(alr printenv)
export: not valid in this context: .DOT_ALIRE_PREFIX
Looking at https://github.com/alire-project/alire/pull/350 and that leading underscores are disallowed I suppose this is unintended behaviour.
Indeed, thanks for the report.