redwood
redwood copied to clipboard
Force file paths computed during Baremetal deploy to always have forward slashes
I ended up not adding the --windows
flag for now because there are paths computed in several different places and I couldn't find an elegant way to give all of the surrounding functions access to the result of the flag. Let's go with this for now and if we get complaints about not being able to deploy to Windows then we can revisit.
Closes #6124
☁️ Nx Cloud Report
CI is running/has finished running commands for commit db4b6822b0bde47c601897e16498e9744752d7c0. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this branch
✅ Successfully ran 14 targets
-
cli run test --concurrency 2 -- --colors --maxWorkers 2
-
cli run test --concurrency 2 -- --colors --maxWorkers 2
-
cli run test --concurrency 2 -- --colors --maxWorkers 2
-
cli run build
-
cli run build
-
cli run build
-
cli run build
-
cli run test --concurrency 2 -- --colors --maxWorkers 2
-
cli run build
-
cli run build
-
cli run build
-
cli run build
-
cli run build
-
cli run build
Sent with 💌 from NxCloud.
Deploy Preview for redwoodjs-docs canceled.
Name | Link |
---|---|
Latest commit | db4b6822b0bde47c601897e16498e9744752d7c0 |
Latest deploy log | https://app.netlify.com/sites/redwoodjs-docs/deploys/62fbf75739041a000c871e61 |
Turns out that slash
package is ESM and it makes everything blow up. Just wrote a simple replace()
instead.
I'm planning on testing this out tonight! Thanks so much for getting a PR together so fast!!
Bookmarking this here for your reference... I found this platform check:
const join = process.platform === 'win32' ? path.win32.join : path.posix.join
That could be shortened to const join = path.posix.join
to force forward slashes.
The code below that could be:
export const execaOptions = {
cwd: join(getPaths().base),
stdio: 'inherit',
shell: true,
cleanup: true,
}
...
await sshExec(ssh, deployPath, 'cp', [
join('web', 'dist', '200.html'),
join('web', 'dist', '200.html.orig'),
])
... etc.
Great catch @pantheredeye , updated!