sindresorhus / grunt-shell

Run shell commands
MIT License
949 stars 126 forks source link

Each command failOnError callback ? #94

Closed jianghai closed 9 years ago

jianghai commented 9 years ago

I have multiple commands like

shell: {
  multiple: {
    options: {
      failOnError: false,
      execOptions: {
        cwd: '../'
      }
    },
    command: [
      'git clone url',
      'git clone url'
    ].join(';')
  }
}

When clone the repro and destination already exists, I want to exec 'git pull', how could I do ?

sindresorhus commented 9 years ago

You can't have a callback for each command, as it's really just one command, you join them.

Easiest would probably be to just do the check in shell script, but that has nothing to do with this task and would be better asked on StackOverflow.