Skip to main content

Shell

Run shell commands and returning output instead of log as run function does.

Usage

import { shell } from '@pinefile/pine';

export default {
example: async () => {
const gitLatestCommitID = await shell('git rev-parse HEAD');
},
};

Options

All Execa options can be used. Pine has some default values that are different from Execa:

  • shell option is default true instead of false so shell-specific features can be used (for or example, && or ||)