0

I am trying to build a Windows .bat script that includes several commands:

ionic state restore
ECHO done restoring state

However, the "ionic state restore" command appears to be exiting out of my control so that I do not see the ECHO or any subsequent steps.

Is there a way to run this in silent mode or in some way I can continue on after it is done?

3
  • 1
    What is this ionic program? Commented Jun 16, 2016 at 16:03
  • ionicframework.com - However, I don't think Ionic is the issue. It's exiting in some way, that's true, but surely there's a way to prevent commands from exiting out of the script you're running them in, right? Commented Jun 16, 2016 at 16:06
  • Well it shouldn't exit the script. But is it is somehow. Commented Jun 16, 2016 at 16:09

1 Answer 1

1

Found the solution with CALL:

The CALL command will launch a new batch file context along with any specified parameters. When the end of the second batch file is reached (or if EXIT is used), control will return to just after the initial CALL statement.

Source: http://ss64.com/nt/call.html

So running the following works great:

CALL ionic state restore
ECHO done restoring state
2
  • Is the ionic command actually a batch file? Commented Jun 16, 2016 at 16:16
  • I believe it is Node-based: github.com/driftyco/ionic-cli Commented Jun 16, 2016 at 16:19

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.