Skip to content

Commit

Permalink
add INIT_CWD env var from CLI, closes #524. 3.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Contra committed Jun 18, 2014
1 parent 0e29133 commit 2bf23ba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# gulp changelog

# 3.8.1

- the CLI now adds process.env.INIT_CWD which is the original cwd it was launched from

# 3.8.0

- update vinyl-fs
Expand Down
4 changes: 4 additions & 0 deletions bin/gulp.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ var completion = require('../lib/completion');
var argv = require('minimist')(process.argv.slice(2));
var taskTree = require('../lib/taskTree');

// set env var for ORIGINAL cwd
// before anything touches it
process.env.INIT_CWD = process.cwd();

var cli = new Liftoff({
name: 'gulp',
completions: completion,
Expand Down
4 changes: 3 additions & 1 deletion docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ gulp has very few flags to know about. All other flags are for tasks to use if n
- `--color` will force gulp and gulp plugins to display colors even when no color support is detected
- `--no-color` will force gulp and gulp plugins to not display colors even when color support is detected

The CLI adds process.env.INIT_CWD which is the original cwd it was launched from

### Tasks

Tasks can be executed by running `gulp <task> <othertask>`. Just running `gulp` will execute the task you registered called `default`. If there is no `default` task gulp will error.

### Compilers

You can find a list of supported languages at [interpret](https://github.com/tkellen/node-interpret#jsvariants). If you would like to add support for a new language send pull request/open issues there.
You can find a list of supported languages at [interpret](https://github.com/tkellen/node-interpret#jsvariants). If you would like to add support for a new language send pull request/open issues there.

0 comments on commit 2bf23ba

Please # to comment.