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
Swallow copy zsh script error to allow multi-user machines #157900
Conversation
} catch { | ||
// Swallow error, this should only happen when multiple users are on the same | ||
// machine. Since the shell integration scripts rarely change, plus the other user | ||
// should be using the same version of the server in this case, assume the script is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you can assume that two users are on the same client version of vscode, especially around the time of a release. And if the name is as generic as /tmp/vscode-zsh/.zshrc
couldn't you have an issue with a single user upgrading too? And insiders vs stable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roblourens I think you're right about multiple versions of the server running at once, though maybe we should notify if we don't when a newer version is installed on the same machine? I didn't want to get into the business of leaving a bunch of per version files around. The impact of not writing this file is quite small as the script doesn't change often and even if it did, it likely wouldn't cause problems and they're easily resolved (update to latest).
We should include the product name in the folder, this was an oversight #159182
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they're easily resolved (update to latest).
When you update, how does it end up actually using a newer version of this file? Seems like the oldest will stick around forever?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roblourens oh, I thought this was related to a lock on the file but it's because a user cannot modify another user's file? I'll reopen the issue then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was how I was reading it but I haven't actually tried that scenario
Fixes #157611