Skip to content

Commit c0cdea2

Browse files
committed
chore: fix error message
Closes #85
1 parent 1a478a4 commit c0cdea2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/lockfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function acquireLock(file, options, callback) {
5151
}
5252

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

5757
// If it's stale, remove it and try again!

test/sync.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('.lockSync()', () => {
3737
lockfile.lockSync(`${tmpDir}/foo`);
3838

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

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

0 commit comments

Comments
 (0)