Skip to content

Commit

Permalink
More debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoli committed Feb 23, 2024
1 parent 4ccff7f commit dfc268f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/test/extension.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ function workspacePath(): string {
* @returns The computed relative path.
*/
function asRelativeWorkspacePath(target: vscode.Uri): string {
let normalizedTarget = path.normalize(target.fsPath);
let normalizedWorkspace = path.normalize(workspacePath());
// Resolve symlinks (especially on MacOS, where `/private/var` is used for `/var`)
let normalizedTarget = fs.realpathSync(target.fsPath);

Check failure on line 30 in src/test/extension.test.ts

View workflow job for this annotation

GitHub Actions / test (macos-latest)

'normalizedTarget' is never reassigned. Use 'const' instead

Check failure on line 30 in src/test/extension.test.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

'normalizedTarget' is never reassigned. Use 'const' instead

Check failure on line 30 in src/test/extension.test.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

'normalizedTarget' is never reassigned. Use 'const' instead
let normalizedWorkspace = fs.realpathSync(workspacePath());

Check failure on line 31 in src/test/extension.test.ts

View workflow job for this annotation

GitHub Actions / test (macos-latest)

'normalizedWorkspace' is never reassigned. Use 'const' instead

Check failure on line 31 in src/test/extension.test.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

'normalizedWorkspace' is never reassigned. Use 'const' instead

Check failure on line 31 in src/test/extension.test.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

'normalizedWorkspace' is never reassigned. Use 'const' instead
let relative = path.relative(normalizedWorkspace, normalizedTarget).replace(/\\/g, "/");

Check failure on line 32 in src/test/extension.test.ts

View workflow job for this annotation

GitHub Actions / test (macos-latest)

'relative' is never reassigned. Use 'const' instead

Check failure on line 32 in src/test/extension.test.ts

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

'relative' is never reassigned. Use 'const' instead

Check failure on line 32 in src/test/extension.test.ts

View workflow job for this annotation

GitHub Actions / test (windows-latest)

'relative' is never reassigned. Use 'const' instead
console.log(`Target path: ${normalizedTarget}`);
console.log(`Workspace path: ${normalizedWorkspace}`);
Expand Down

0 comments on commit dfc268f

Please sign in to comment.