Skip to content

Commit 217d9e4

Browse files
Merge pull request #2549 from apeltop/fix-typo
refactor: fix typo
2 parents d6587f1 + a1ef593 commit 217d9e4

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/configuration/nest-configuration.loader.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Reader, ReaderFileLackPersmissionsError } from '../readers';
1+
import { Reader, ReaderFileLackPermissionsError } from '../readers';
22
import { Configuration } from './configuration';
33
import { ConfigurationLoader } from './configuration.loader';
44
import { defaultConfiguration } from './defaults';
@@ -33,9 +33,9 @@ export class NestConfigurationLoader implements ConfigurationLoader {
3333
]);
3434

3535
if (contentOrError) {
36-
const isMissingPersmissionsError =
37-
contentOrError instanceof ReaderFileLackPersmissionsError;
38-
if (isMissingPersmissionsError) {
36+
const isMissingPermissionsError =
37+
contentOrError instanceof ReaderFileLackPermissionsError;
38+
if (isMissingPermissionsError) {
3939
console.error(contentOrError.message);
4040
process.exit(1);
4141
}

lib/readers/file-system.reader.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as fs from 'fs';
22
import * as path from 'path';
3-
import { Reader, ReaderFileLackPersmissionsError } from './reader';
3+
import { Reader, ReaderFileLackPermissionsError } from './reader';
44

55
export class FileSystemReader implements Reader {
66
constructor(private readonly directory: string) {}
@@ -15,7 +15,7 @@ export class FileSystemReader implements Reader {
1515

1616
public readAnyOf(
1717
filenames: string[],
18-
): string | undefined | ReaderFileLackPersmissionsError {
18+
): string | undefined | ReaderFileLackPermissionsError {
1919
let firstFilePathFoundButWithInsufficientPermissions: string | undefined;
2020

2121
for (let id = 0; id < filenames.length; id++) {
@@ -41,7 +41,7 @@ export class FileSystemReader implements Reader {
4141
}
4242

4343
if (firstFilePathFoundButWithInsufficientPermissions) {
44-
return new ReaderFileLackPersmissionsError(
44+
return new ReaderFileLackPermissionsError(
4545
firstFilePathFoundButWithInsufficientPermissions,
4646
readErr.code,
4747
);

lib/readers/reader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export class ReaderFileLackPersmissionsError extends Error {
1+
export class ReaderFileLackPermissionsError extends Error {
22
constructor(
33
public readonly filePath: string,
44
public readonly fsErrorCode: string,
@@ -12,5 +12,5 @@ export interface Reader {
1212
read(name: string): string;
1313
readAnyOf(
1414
filenames: string[],
15-
): string | undefined | ReaderFileLackPersmissionsError;
15+
): string | undefined | ReaderFileLackPermissionsError;
1616
}

0 commit comments

Comments
 (0)