Skip to content

Conversation

austin3dickey
Copy link
Contributor

Addresses #9013. Adds a remoteSSH.serverInstallPath setting that lets you customize the Positron server data directory, instead of the default ~/.positron-server.

Release Notes

New Features

Bug Fixes

  • N/A

QA Notes

The new setting should be respected. To test on this branch, you'll unfortunately need to build REH on the remote host and put it where it needs to be. It'll be easier to test on a daily build.

Copy link

E2E Tests 🚀
This PR will run tests tagged with: @:critical

readme  valid tags

Copilot

This comment was marked as resolved.


let commandOutput: { stdout: string; stderr: string };
if (platform === 'windows') {
// If the default was not changed, adjust the path for PowerShell on Windows
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't support windows anyway

Copy link
Contributor

@isabelizimm isabelizimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did not try it out, but the code looks good! happy to test it out on a daily build, since that seems maybe more straightforward? or, are you able to give repro steps?

const productJson = await getVSCodeProductJson();

const customServerBinaryName = vscode.workspace.getConfiguration('remoteSSH.experimental').get<string>('serverBinaryName', '');
const customDataFolderName = vscode.workspace.getConfiguration('remoteSSH').get<string>('serverInstallPath', '');
Copy link
Contributor

@isabelizimm isabelizimm Oct 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUPER SUPER nit, could set default here rather than later

Suggested change
const customDataFolderName = vscode.workspace.getConfiguration('remoteSSH').get<string>('serverInstallPath', '');
const serverDataFolderName = vscode.workspace.getConfiguration('remoteSSH').get<string>('serverInstallPath', productJson.serverDataFolderName);

Copy link
Collaborator

@jmcphers jmcphers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs just a few more tweaks:

  • it is pretty easy to just type something like .positron-server-2 into the setting if you aren't reading carefully, and the behavior is undefined in this case. If the user doesn't specify an absolute path, I think we should resolve the relative path against $HOME by default
  • the setting is application scoped but this feels more like a per project/machine thing b/c you probably won't have the same needs for everything you connect to. maybe change the scope? another idea would be to make the value something you can override with an env var so it could be configured on the host side
  • if the user specifies a path that they can't write to and we can't make for them, what happens? (think we need better error handling for this than we have today)
  • do we actually expand tildes in the setting value? (wasn't clear to me but the default uses $HOME; if not, the example shouldn't use them)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants