Skip to content

Commit

Permalink
fix(pack-directory): Use correct property when packing subdirectories
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Jul 23, 2019
1 parent 2007125 commit 1575396
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions utils/pack-directory/__tests__/pack-directory.test.js
Expand Up @@ -194,8 +194,8 @@ describe("pack-directory", () => {
const last = pkgs.pop();
const subs = await packDirectory(
last,
// TODO: use location
last.contents,
// a real package doesn't _actually_ need this argument
undefined,
conf
);

Expand Down
6 changes: 3 additions & 3 deletions utils/pack-directory/lib/pack-directory.js
Expand Up @@ -24,7 +24,7 @@ function packDirectory(_pkg, dir, _opts) {
const pkg = Package.lazy(_pkg, dir);
const opts = PackConfig(_opts);

opts.log.verbose("pack-directory", path.relative(".", dir));
opts.log.verbose("pack-directory", path.relative(".", pkg.contents));

let chain = Promise.resolve();

Expand All @@ -42,11 +42,11 @@ function packDirectory(_pkg, dir, _opts) {

chain = chain.then(() => runLifecycle(pkg, "prepack", opts));
chain = chain.then(() => pkg.refresh());
chain = chain.then(() => packlist({ path: dir }));
chain = chain.then(() => packlist({ path: pkg.contents }));
chain = chain.then(files =>
tar.create(
{
cwd: dir,
cwd: pkg.contents,
prefix: "package/",
portable: true,
// Provide a specific date in the 1980s for the benefit of zip,
Expand Down

0 comments on commit 1575396

Please sign in to comment.