Skip to content

Commit e1f15e8

Browse files
committed
add docker command for wsl2 v7
1 parent 0f1b4ae commit e1f15e8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/install/setupLocalWindows.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ const runCommand = (command: string, throwOnError = true) => {
2323
try {
2424
// Auto-prefix docker/devcontainer commands with sudo if needed
2525
let finalCommand = command;
26-
if ((command.includes('docker') || command.includes('devcontainer')) && needsSudoForDocker()) {
27-
// Use sudo -E to preserve environment (especially PATH for pnpm/devcontainer)
26+
if ((command.startsWith('docker') || command.startsWith('devcontainer')) && needsSudoForDocker()) {
27+
// Use sudo -E to preserve environment (especially PATH for devcontainer)
2828
finalCommand = `sudo -E ${command}`;
2929
console.log('ℹ️ Using sudo for Docker commands (run without sudo after logging out/in)');
3030
}

0 commit comments

Comments
 (0)