Skip to content

Commit

Permalink
Clearer explanation of --load-from option. (#872)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppieesq authored and greg-1-anderson committed Jul 26, 2019
1 parent de60f77 commit c413ea5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,22 @@ The default value for options must be one of:

No other values should be used for the default value. For example, `$options = ['a' => 1]` is **incorrect**; instead, use `$options = ['a' => '1']`. Similarly, `$options = ['a' => true]` is unsupported, or at least not useful, as this would indicate that the value of `--a` was always `true`, whether or not it appeared on the command line.

### Load From Other Directories
### Load From Other Robofile

Robo can execute commands from a RoboFile located in different directory.
Robo can execute commands from a different RoboFile, eg. located in different directory or with a different filename.
You can specify the path to another RoboFile by including the `--load-from` option:

```
robo run --load-from /path/to/my/other/project
robo run --load-from /path/to/my/other/robofile
```

Additional notes:

- The filename can be anything; it is not limited to `RoboFile.php`.
- The class name inside the file has to be the same name as the file has.
- The class has to be in the root namespace. Eg. `Foo.php => \Foo`
- The internal current directory (cwd) of the PHP process will be switched to the directory where the provided RoboFile came from.

### Pass-Through Arguments

Sometimes you need to pass arguments from your command into a task. A command line after the `--` characters is treated as one argument.
Expand Down

0 comments on commit c413ea5

Please sign in to comment.