Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EntryCommand<Context>

Type parameters

  • Context: BaseContext

Hierarchy

  • Command
    • EntryCommand

Properties

Methods

Object literals

Properties

args

args: string[] = Option.Proxy()

commandName

commandName: string = Option.String()

cwd

cwd: string = Option.String(`--cwd`, process.cwd(), {description: `The directory to run the command in`,})

Methods

execute

  • execute(): Promise<number>

Object literals

Static usage

usage: object

description

description: string = `run a command using yarn's portable shell`

details

details: string = `This command will run a command using Yarn's portable shell.Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.`

examples

examples: [string, string][] = [[`Run a simple command`,`$0 echo Hello`,], [`Run a command with a glob pattern`,`$0 echo '*.js'`,], [`Run a command with a redirection`,`$0 echo Hello World '>' hello.txt`,], [`Run a command with an escaped glob pattern (The double escape is needed in Unix shells)`,`$0 echo '"*.js"'`,], [`Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)`,`$0 "GREETING=Hello echo $GREETING World"`,]]

Generated using TypeDoc