onepub-dev / dcli

An extensive library and tooling for building console/cli applications and scripts using the Dart programming language.
236 stars 26 forks source link

Missing directory path in create message #182

Closed whoizit closed 2 years ago

whoizit commented 2 years ago

dcli 1.15.4

~ > dcli create bin/spawn.dart
Creating script...

To run your script:
   ./spawn.dart

should be

~ > dcli create bin/spawn.dart
Creating script...

To run your script:
   ./bin/spawn.dart
bsutton commented 2 years ago

Thanks for reporting the problem.

I'm about to completely rewrite the create to make it more intelligent so will resolve this issue as part of that work. It's probably not going to get done until next year.

bsutton commented 2 years ago

1.16 has a complete re-write of the creation logic however I just noticed it still has this problem :<

cd tool

 dcli create init_db.dart

Creating init_db.dart from .dcli/template/script/simple.

  Created script init_db.dart in myproject.

  To run your script:

    ./init_db.dart

The Created script should have been:

Created script init_db.dart in myproject/tool

whoizit commented 2 years ago

for my experience it looks like absolutely correct now

~ > dcli create bin/test.dart

Creating bin/test.dart from /home/user/.dcli/template/script/simple.

  Created script bin/test.dart in /home/user/bin.

  To run your script:

    bin/test.dart
~ > cd bin  
~/bin > dcli create test2.dart

Creating test2.dart from /home/user/.dcli/template/script/simple.

  Created script test2.dart in /home/user/bin.

  To run your script:

    ./test2.dart

only this string incorrect in first case Created script bin/test.dart in /home/user/bin.

bsutton commented 2 years ago

Yes you are correct. I will try and get this fixed in the next few days.

As always thanks for your feedback. If you have some time I wouldn't mind catching up to discuss how you are using dcli. I'm trying to get a better understanding of the common use cases.

bsutton commented 2 years ago

The messages are now correct in the 1.32 version .