Permalink
Browse files

Current directory reference needs to be saved just before descending …

…into package dir for compression.
  • Loading branch information...
1 parent 42474be commit a7e4cf8bc8b89fb22662e32358323dbc2d3d06c4 mde committed Jun 24, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 lib/package_task.js
View
@@ -18,8 +18,7 @@
var path = require('path')
, fs = require('fs')
- , exec = require('child_process').exec
- , currDir = process.cwd();
+ , exec = require('child_process').exec;
/**
@name jake
@@ -241,7 +240,10 @@ PackageTask.prototype = new (function () {
file(filename, [packageDirPath], function () {
var cmd
- , opts = _compressOpts[p];
+ , opts = _compressOpts[p]
+ // Save the current dir so it's possible to pop back up
+ // after compressing
+ , currDir = process.cwd();
// Move into the package dir to compress (see below, after
// exec)
@@ -269,7 +271,7 @@ PackageTask.prototype = new (function () {
exec(cmd, function (err, stdout, stderr) {
if (err) { throw err; }
- // Return back up to the project directory (see above,
+ // Return back up to the starting directory (see above,
// before exec)
process.chdir(currDir);

0 comments on commit a7e4cf8

Please sign in to comment.