alire icon indicating copy to clipboard operation
alire copied to clipboard

Disallow identifiers starting with dots

Open jklmnn opened this issue 2 years ago • 1 comments

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.

jklmnn avatar Jun 30 '22 13:06 jklmnn

Indeed, thanks for the report.

mosteo avatar Jul 05 '22 08:07 mosteo