gonuit / rps

Define and use scripts from your pubspec.yaml file.
MIT License
44 stars 8 forks source link

Terminal keeps busy after running command #5

Closed sezer closed 2 years ago

sezer commented 2 years ago

Hello, thanks for the great idea and package. I'm trying to run the rps command on the Macbook M1 machine. Commands run successfully but the terminal keeps showing a result message. I'm not able to run a new command without ctrl+c.

scripts:
   # run is a default script. To use it, simply type
   # in the command line: "rps" - that's all!
   run: "flutter run -t lib/main.dart --flavor development"
   # you can define more commands like this: "rps gen"
   gen: "flutter pub run build_runner watch --delete-conflicting-outputs"
   build:
      android:
         apk-dev: "flutter build apk --dart-define FLAVOR=\"development\""
      ios:
         ipa-dev: "flutter build ipa --export-method ad-hoc --dart-define FLAVOR=\"development\""

I'm running rps gen

❯ rps gen
> gen
$ flutter pub run build_runner watch --delete-conflicting-outputs

And then the terminal keeps stuck as below

Screen Shot 2022-07-20 at 13 26 31

This works as expected

> flutter pub run build_runner build --delete-conflicting-outputs
gonuit commented 2 years ago

Hi @sezer 👋🏻

Basically, the watch is waiting for the file changes and then performing an incremental rebuild − so this is also an expected behavior. It is just how the watch command works. You can run this command without the rps package and notice that the behavior will be the same.

If you have any additional questions, just feel free to ask.

sezer commented 2 years ago

@gonuit but it is not working the same way. You can see the result of the command if I run it directly. After the successful command, the terminal is ready to run a new one.

Screen Shot 2022-07-25 at 17 23 50