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

Couldn't detect the home directory for 'configuration' #294

Closed
hexDoor opened this issue Oct 2, 2021 · 1 comment
Closed

Couldn't detect the home directory for 'configuration' #294

hexDoor opened this issue Oct 2, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@hexDoor
Copy link

hexDoor commented Oct 2, 2021

After some painful debugging with a student, I just wanted to draw attention to a potential race condition(?) which is causing the error in the title.

As part of an introductory programming task, the student had placed a command to execute a MOTD-like C binary in their .bashrc whenever it gets sourced to generate some coloured ASCII art into stdout.

Since the issue immediately goes away upon removing this command and reappears when putting it back in, I reckon the output from the echo Home: ~ is being corrupted with the ASCII art.

const exec = await toPromise<ClientChannel>(cb => ssh.exec('echo Home: ~', cb));

I don't know if there's an elegant fix for it other than to save output to a file in /tmp and reading from it but that should be a good start.

@SchoofsKelvin
Copy link
Owner

SchoofsKelvin commented Oct 2, 2021

Fixed in 860f65a and released in v1.23.0 of the extension. If your student installed it from the marketplace, it should auto-update, or at least give you a quick "Update to 1.23.0" button in the extensions tab.

Instead of expecting the output to be of the exact format Home: <path>, it now echoes ::sshfs:home:<path>\n which it'll look for, no longer being affected by whether .bashrc (or similar) echoes anything before/after the "magic pattern".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants