Skip to content

Commit

Permalink
Fixed wp-env run Windows Path Resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
ObliviousHarmony committed May 23, 2023
1 parent f616b1b commit a0c0121
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/env/lib/commands/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ function spawnCommandDirectly( config, container, command, envCwd, spinner ) {
// to interact with the files mounted from the host.
const hostUser = getHostUser();

// We need to pass absolute paths to the container.
envCwd = path.resolve(
// Since Docker requires absolute paths, we should resolve the input to a POSIX path.
// This is needed because Windows resolves relative paths from the C: drive.
envCwd = path.posix.resolve(
// Not all containers have the same starting working directory.
container === 'mysql' || container === 'tests-mysql'
? '/'
Expand Down

0 comments on commit a0c0121

Please sign in to comment.