-
Notifications
You must be signed in to change notification settings - Fork 685
Conversation
…up as a background process
--detach
flag
I looked into different ways to test this, and unfortunately came up empty. I think it would be reasonable to test the cli via Unfortunately this becomes difficult with There's some workarounds I've found in unmaintained projects, where they Keen to hear people's thoughts. |
… (but don't show that in the help, because it's ugly)
I've manually validated this on Mac, Ubuntu, and Windows 🎉 |
IIRC a I have no idea how that would translate to other operating systems or how npm would install a .service file into If I understand, there is no way to stop the background process without killing the PID directly. It would be awesome if the system-level tools could manage that - it would avoid the polling. Forever-js used to be the way to keep node going in the background. I believe they do something similar but start a worker that runs in the background, listens to a socket for communication from the cli and stores the PID of the child process somewhere. So you are in good company there. |
Is it typical for a detach mode to return the PID and only the PID? What other tools operate this way? Tracking the PIDs ✨somewhere✨, as @tenthirtyone suggested, sounds reasonable for a follow up PR. IN the future we could have detached child open a socket (don't know if there is a way to reconnect to the original IPC socket) to allow for new connections to communicate with the process, then we could do things like Oh, one question. Should We pipe stdout somewhere else by default in this initial release, or should we let just let it get directed into the blackhole (/dev/null) until a user asks for a way to access the logs? Last note: for the release notes description, can you also provide a Windows (either cmd.exe or Powershell) example, if there is reasonable equivalent? |
…tance files if the process no longer exists.
…tance data file to JSON format.
…etach flags, rather append to the child args, cancelling out all preceeding flags.
…rom instances directory that aren't valid json files. Rename 'poppy-seed' to 'poppyseed' because hyphens in the instance name are a pain!
…n instances table. Revert changes to standardise prompts in README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drive by feedback. I'm excited to get this in my hands. OR, get my hands on this. wheeeeee
Documentation added here: trufflesuite/trufflesuite.com#1367 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHIP IT!
Do you need to detach? Do you need to do it now?
It can be annoying needing an extra terminal open just to run Ganache. This becomes super annoying when you want to have different instances and flavors of Ganache running at the same time.
Enter: Detach mode.
Start Ganache with the
--detach
flag, and it'll return to the console as soon as Ganache is ready to receive requests (writing the name of the instance to stdout).ganache instances list
will show you all of the instances of Ganache running in Detach mode, and you can stop them withganache instances stop <name>
.With the following command, you can start Ganache, run your tests, and stop Ganache when you are finished.
Or if you are running PowerShell on Windows, you can do:
Fixes: #1001