[Bug]: code-server ignores path argument and always opens last location
See original GitHub issueIs 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
- open code-server on directory foo:
code-server /path/to/project/foo
- close/kill/stop code-server
- 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:
- Created a year ago
- Comments:13 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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).
That’s because this hasn’t ben fixed yet. Hoping we can get to this soon.