Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Lars Kappert <[email protected]>
  • Loading branch information
beaussan and webpro authored Oct 17, 2023
1 parent 1a588a1 commit d96aea3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const config: KnipConfig = {
export default config;
```

And if you need, you can also expose a function or an async function if you need, like so :
And if you need, you can also expose an (async) function if you need, like so:

```ts
import type { KnipConfig } from 'knip';
Expand Down
2 changes: 1 addition & 1 deletion src/ConfigurationChief.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class ConfigurationChief {
try {
return await unwrapFunction(loadedValue);
} catch (e) {
throw new ConfigurationError(`Unable to run the function from the knip config file`);
throw new ConfigurationError(`Error running the function from ${configPath}`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/util/unwrapFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const unwrapFunction = async (possibleFunction: unknown) => {
try {
return await possibleFunction();
} catch (error) {
debugLogObject('Error executing function:', error);
debugLogObject('*', 'Error executing function:', error);
throw error;
}
}
Expand Down

0 comments on commit d96aea3

Please sign in to comment.