Skip to content

Commit

Permalink
fix(instr-tedious): fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
david-luna committed May 7, 2024
1 parent e0dc182 commit febb0d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/opentelemetry-test-utils/src/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ export const getPackageVersion = (packageName: string) => {
let packageJsonDir = path.dirname(packagePath);
let packageJsonPath = path.join(path.dirname(packagePath), 'package.json');

while(!existsSync(packageJsonPath) && !packageJsonDir.endsWith('node_modules') && packageJsonDir !== '/') {
while (
!existsSync(packageJsonPath) &&
!packageJsonDir.endsWith('node_modules') &&
packageJsonDir !== '/'
) {
packageJsonDir = path.join(packageJsonDir, '..');
packageJsonPath = path.join(packageJsonDir, 'package.json');
}
Expand Down

0 comments on commit febb0d2

Please sign in to comment.