Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: construct full path for workspaceLogPath instead of just filename#554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
code-asher merged 1 commit intomainfromfix/workspace-log-path-full-path
Jul 17, 2025

Conversation

@blink-so
Copy link
Contributor

Problem

The VS Code extension was failing to open SSH proxy log files with the error:

cannot open file:///coder-ssh-20250716-123428-qvict-90716.log. Detail: Unable to read file '/coder-ssh-20250716-123428-qvict-90716.log' (Error: Unable to resolve nonexistent file '/coder-ssh-20250716-123428-qvict-90716.log')

This occurred becauseworkspaceLogPath was being set to just the filename instead of the full path, causing VS Code to look for the file in the wrong location.

Solution

Modified the code insrc/remote.ts to properly construct the full path usingpath.join(logDir, logFileName) instead of just storing the filename.

Before:

this.commands.workspaceLogPath=logFiles.reverse().find((file)=>file===`${pid}.log`||file.endsWith(`-${pid}.log`));

After:

constlogFileName=logFiles.reverse().find((file)=>file===`${pid}.log`||file.endsWith(`-${pid}.log`));this.commands.workspaceLogPath=logFileName    ?path.join(logDir,logFileName)    :undefined;

Testing

  • ✅ TypeScript compilation passes
  • ✅ ESLint passes with no style issues
  • ✅ Verified the fix constructs proper full paths like/tmp/coder-logs/coder-ssh-20250716-123428-qvict-90716.log

This fix ensures that when users configure thecoder.proxyLogDirectory setting and use the "View Logs" command, VS Code can successfully open the SSH proxy log files.

The workspaceLogPath was being set to just the log filename instead of thefull path, causing VS Code to fail when trying to open the log file with'Unable to resolve nonexistent file' errors.This fix ensures that path.join(logDir, logFileName) is used to constructthe complete file path, allowing the 'View Logs' command to work properlywhen coder.proxyLogDirectory is configured.Fixes the issue where log files like 'coder-ssh-20250716-123428-qvict-90716.log'could not be opened because they were referenced by filename only.Co-authored-by: ibetitsmike <203725896+ibetitsmike@users.noreply.github.com>
@code-asher
Copy link
Member

Good catch, seems we accidentally lost the originalpath.join() when switching tocoder ssh.

blink-so[bot] reacted with thumbs up emoji

@code-ashercode-asher merged commit8dee463 intomainJul 17, 2025
2 checks passed
@code-ashercode-asher deleted the fix/workspace-log-path-full-path branchJuly 17, 2025 19:19
@matifali
Copy link
Member

matifali commentedJul 23, 2025
edited
Loading

@deansheather Does this look related to#560,#542?

blink-so[bot] reacted with thumbs up emoji

@deansheather
Copy link
Member

IDK, it might fix it though.

blink-so[bot] and matifali reacted with thumbs up emoji

@matifali
Copy link
Member

Let's test again after we have a new release and we can close those issues.

blink-so[bot] reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@code-ashercode-ashercode-asher approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@code-asher@matifali@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp