Skip to content

Commit

Permalink
use absolute or relative path for deploy target
Browse files Browse the repository at this point in the history
replaces path.join in deploy with path.resolve which will resolve relative and absolute paths to a relative path.
pnpm#4980
  • Loading branch information
AWare committed Jul 13, 2022
1 parent 701f158 commit acdd123
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-commands-deploy/src/deploy.ts
Expand Up @@ -45,7 +45,7 @@ export async function handler (
throw new PnpmError('INVALID_DEPLOY_TARGET', 'This command requires one parameter')
}
const deployedDir = selectedDirs[0]
const deployDir = path.join(opts.workspaceDir, params[0])
const deployDir = path.resolve(params[0])
await rimraf(deployDir)
await fs.promises.mkdir(deployDir, { recursive: true })
await copyProject(deployedDir, deployDir)
Expand Down

0 comments on commit acdd123

Please sign in to comment.