Skip to content

Commit

Permalink
Fix ".bin" not linked when preparing a git dependency, reported in ya…
Browse files Browse the repository at this point in the history
  • Loading branch information
lovelypuppy0607 committed Jun 28, 2017
1 parent bc89186 commit f04040f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion __tests__/fetchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ test('GitFetcher.fetch with prepare script', async () => {
{
type: 'git',
reference: 'https://github.com/Volune/test-js-git-repo',
hash: '96e838bcc908ed424666b4b04efe802fd4c8bccd',
hash: '0e56593e326069ed4bcec8126bb48a1891215c57',
registry: 'npm',
},
(await Config.create()),
Expand All @@ -95,6 +95,8 @@ test('GitFetcher.fetch with prepare script', async () => {
expect(dependencyName).toBe('beeper');
// The file "prepare.js" is not in "files" list
expect(await fs.exists(path.join(dir, 'prepare.js'))).toBe(false);
// Check the dependency with a bin script was correctly executed
expect(await fs.exists(path.join(dir, 'testscript.output.txt'))).toBe(true);
// Check executed lifecycle scripts
expect(await fs.exists(path.join(dir, 'generated', 'preinstall'))).toBe(true);
expect(await fs.exists(path.join(dir, 'generated', 'install'))).toBe(true);
Expand Down
1 change: 1 addition & 0 deletions src/fetchers/git-fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export default class GitFetcher extends BaseFetcher {
const [prepareConfig, prepareLockFile] = await Promise.all([
Config.create(
{
binLinks: true,
cwd: prepareDirectory,
disablePrepublish: true,
},
Expand Down

0 comments on commit f04040f

Please sign in to comment.