Skip to content

Commit

Permalink
fix: username have space
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhiter committed Nov 13, 2024
1 parent d67b6fe commit 482a5de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion extensions/ide/vscode/devbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "devbox-aio",
"displayName": "Devbox",
"description": "help code for cloud devbox in sailos/sealos",
"version": "1.0.3",
"version": "1.0.4",
"keywords": [
"devbox",
"remote development",
Expand Down
7 changes: 6 additions & 1 deletion extensions/ide/vscode/devbox/src/commands/remoteConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ export class RemoteSSHConnector extends Disposable {

private replaceHomePathInConfig(content: string): string {
const includePattern = /Include ~\/.ssh\/sealos\/devbox_config/
const includeLine = `Include ${os.homedir()}/.ssh/sealos/devbox_config`
const includePattern2 = new RegExp(
`Include ${os.homedir()}/.ssh/sealos/devbox_config`
)
const includeLine = `Include "${os.homedir()}/.ssh/sealos/devbox_config"`

if (includePattern.test(content)) {
return content.replace(includePattern, includeLine)
} else if (includePattern2.test(content)) {
return content.replace(includePattern2, includeLine)
} else {
return `${includeLine}\n${content}`
}
Expand Down

0 comments on commit 482a5de

Please sign in to comment.