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 defaulttrue
instead offalse
so shell-specific features can be used (for or example,&&
or||
)