abp cli command new: Should prevent user from using special chars in project name.

Created on 19 Jul 2019  路  4Comments  路  Source: abpframework/abp

I noticed this morning that the abp new command does not prevent users from using special chars in the project name. (i.e. abp new Acme.Book-Store)

image

abp-cli enhancement normal

Most helpful comment

Ideally this should follow same sanitation pattern as dotnet cli with it's dotnet new mvc --name {name}, since that is also creating .NET Core project. Code for that will most likely be in templating engine or maybe even the cli itself shrug.

All 4 comments

I'm working on this issue. How should this be handled? MS project templates seem to replace special chars with an "_" (i.e. Project: Acme.Book-Store -> Acme.Book_Store)

Any suggestions or objections to this implementation?

Ideally this should follow same sanitation pattern as dotnet cli with it's dotnet new mvc --name {name}, since that is also creating .NET Core project. Code for that will most likely be in templating engine or maybe even the cli itself shrug.

I think, I'm getting close, but still haven't found the code that processes the project name. I send Phil at MS an email to see if could point me in the rigth direction.

https://github.com/dotnet/cli/tree/master/src/dotnet/commands
https://github.com/dotnet/cli/tree/master/src/dotnet/commands/dotnet-new

Thank you guys. Any PR welcome :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hikalkan picture hikalkan  路  3Comments

Trojaner picture Trojaner  路  3Comments

ugurozturk picture ugurozturk  路  3Comments

hikalkan picture hikalkan  路  3Comments

hikalkan picture hikalkan  路  3Comments