Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand ~ from config #7051

Open
1 task done
ForteDexe opened this issue Oct 25, 2024 · 2 comments
Open
1 task done

Expand ~ from config #7051

ForteDexe opened this issue Oct 25, 2024 · 2 comments
Labels
enhancement Some improvement that isn't a feature

Comments

@ForteDexe
Copy link

ForteDexe commented Oct 25, 2024

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Vivaldi
  • Local OS: Ubuntu 24.10
  • Remote OS: Ubuntu 24.10
  • Remote Architecture: amd64
  • code-server --version: 4.93.1 69df011 with Code 1.93.1

Steps to Reproduce

  1. add this user-data-dir: ~/.config/code-server-data to config.yaml
  2. run command code-server

Expected

~/.config/code-server-data

Actual

But in the web browser, it will be:

~/~/.config/code-server-data

Note

I get it now, depends on where the current directory in the terminal is, code-server will use the current directory plus user-data-dir

@ForteDexe ForteDexe added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Oct 25, 2024
@code-asher
Copy link
Member

~ is normally expanded by the shell, so it would not get expanded in a YAML config. But, it would be nice if we manually expand it when we read the config.

@code-asher code-asher changed the title Ubuntu config.yaml user-data-dir, duplicate '~' Expand ~ from config Oct 29, 2024
@code-asher code-asher added enhancement Some improvement that isn't a feature and removed bug Something isn't working triage This issue needs to be triaged by a maintainer labels Oct 29, 2024
@ForteDexe
Copy link
Author

If run as the services, using ~ it recognizes the user-data folder well
But other stuff might not, ie:

[error] Unable to read file '/~/.config/code-server-user-data/extensions/extensions.json' (Error: Unable to resolve nonexistent file '/~/.config/code-server-user-data/extensions/extensions.json'): Error: Unable to read file '/~/.config/code-server-user-data/extensions/extensions.json' (Error: Unable to resolve nonexistent file '/~/.config/code-server-user-data/extensions/extensions.json')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Some improvement that isn't a feature
Projects
None yet
Development

No branches or pull requests

2 participants