Skip to content

Commit

Permalink
chore: fix error message
Browse files Browse the repository at this point in the history
Closes #85
  • Loading branch information
satazor committed Apr 2, 2019
1 parent 1a478a4 commit c0cdea2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/lockfile.js
Expand Up @@ -51,7 +51,7 @@ function acquireLock(file, options, callback) {
}

if (!isLockStale(stat, options)) {
return callback(Object.assign(new Error('Lock file is already being hold'), { code: 'ELOCKED', file }));
return callback(Object.assign(new Error('Lock file is already being held'), { code: 'ELOCKED', file }));
}

// If it's stale, remove it and try again!
Expand Down
2 changes: 1 addition & 1 deletion test/sync.test.js
Expand Up @@ -37,7 +37,7 @@ describe('.lockSync()', () => {
lockfile.lockSync(`${tmpDir}/foo`);

expect(fs.existsSync(`${tmpDir}/foo.lock`)).toBe(true);
expect(() => lockfile.lockSync(`${tmpDir}/foo`)).toThrow(/already being hold/);
expect(() => lockfile.lockSync(`${tmpDir}/foo`)).toThrow(/already being held/);
});

it('should pass options correctly', () => {
Expand Down

0 comments on commit c0cdea2

Please sign in to comment.