0

Say I need to source a shell script via one of these two examples:

$ source setup.bash

$ . setup.sh

and then run a command included in PATH as a result of the previous step. How could you set up a method to perform these two steps using the Dart IO Process API? Is it necessary to manually pass the environment from one to the other somehow?

Crunchex
  • 307
  • 2
  • 10
  • Can't you run both of the setup and the command you want to run in the same process? – Robert Apr 07 '15 at 07:30
  • I guess I don't fully understand how the Process.run method works. Is it not true that each invocation is completely isolated, with one command being run per invocation? – Crunchex Apr 07 '15 at 15:08
  • Have a look at the dart package dshell, it makes the stuff easy. Full disclosure I'm the author of dshell. – Brett Sutton Jan 19 '20 at 06:09

0 Answers0