question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: code-server ignores path argument and always opens last location

See original GitHub issue

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: macOS
  • Remote OS: Linux
  • Remote Architecture: amd64
  • code-server --version: 4.2.0 693b1fac04524bb0e0cfbb93afc85702263329bb with Code 1.64.2

Steps to Reproduce

  1. open code-server on directory foo: code-server /path/to/project/foo
  2. close/kill/stop code-server
  3. open code-server on directory bar: code-server /some/other/path/bar

Expected

For code-server to run with the project base in /some/other/path/bar.

Actual

code-server runs with the project base /path/to/project/foo

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code?

  • I cannot reproduce this in VS Code.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

This has worked fine until recently.

Using over SSH tunnel, NOT HTTPS.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
code-ashercommented, Aug 2, 2022

So looking at the commit history I think this happened during the switch to upstream’s server. Upstream’s implementation was preferring the last opened over the provided path so that naturally became our default as well. That makes sense since I did not recall explicitly changing this behavior. Eventually we had to move the implementation back to our side (theirs did not work so we had to re-implement it) which is why I was remembering the current behavior.

This happened during a major version bump so I guess that panned out; changing it at this point seems like it might be risky if users are depending on the current behavior unless we major bump. If we had realized the implementation was different we could have changed it then but I think I had forgotten until now it used to be another way (probably we were just porting the upstream implementation and not really thinking too deeply about it).

1reaction
jsjoeiocommented, Jul 18, 2022

I was able to reproduce this. I can’t get it to take my path argument.

That’s because this hasn’t ben fixed yet. Hoping we can get to this soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modify default directory/workspace behavior #1132 - GitHub
Using last opened workspace/directory, in other words, ignoring a path which a user specified explicitly is quite strange and frustrating at ...
Read more >
Settings Reference for Python - Visual Studio Code
Python settings reference. The Python Extension for Visual Studio Code is highly configurable. This page describes the key settings you can work with....
Read more >
FAQ - code-server v4.8.0 docs - Coder
The folder query parameter; The workspace or directory passed via the command line; The last opened workspace or directory. How do I access...
Read more >
RStudio Release Notes
Improved handling of missing arguments for some functions in the ... if the configured jupyter path was a symlink to the actual install...
Read more >
Error handling - Apollo GraphQL Docs
Your resolvers can also throw errors in situations where Apollo Server doesn't do so automatically. For example, this resolver throws a custom error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found