mirror of
https://github.com/codex-storage/cli.git
synced 2025-02-28 08:30:41 +00:00
Fixes args formatting on win
This commit is contained in:
parent
0c4a6c5ba4
commit
993625affc
@ -71,22 +71,19 @@ export async function runCodex(showNavigationMenu) {
|
||||
nat = await runCommand('curl -s https://ip.codex.storage');
|
||||
}
|
||||
|
||||
const command = platform === 'win32'
|
||||
? `codex ^
|
||||
--data-dir=datadir ^
|
||||
--disc-port=${discPort} ^
|
||||
--listen-addrs=/ip4/0.0.0.0/tcp/${listenPort} ^
|
||||
--nat=${nat} ^
|
||||
--api-cors-origin="*" ^
|
||||
--bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P`
|
||||
: `codex \
|
||||
--data-dir=datadir \
|
||||
--disc-port=${discPort} \
|
||||
--listen-addrs=/ip4/0.0.0.0/tcp/${listenPort} \
|
||||
--nat=\`curl -s https://ip.codex.storage\` \
|
||||
--api-cors-origin="*" \
|
||||
--bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P`;
|
||||
const executable = `codex`;
|
||||
const args = [
|
||||
`--data-dir=datadir`,
|
||||
`--disc-port=${discPort}`,
|
||||
`--listen-addrs=/ip4/0.0.0.0/tcp/${listenPort}`,
|
||||
`--nat=${nat}`,
|
||||
`--api-cors-origin="*"`,
|
||||
`--bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P`
|
||||
];
|
||||
|
||||
const command =
|
||||
`${executable} ${args.join(" ")}`
|
||||
|
||||
console.log(showInfoMessage(
|
||||
'🚀 Codex node is running...\n\n' +
|
||||
'Please keep this terminal open. Start a new terminal to interact with the node.\n\n' +
|
||||
@ -256,7 +253,7 @@ export async function checkNodeStatus(showNavigationMenu) {
|
||||
|
||||
if (nodeRunning) {
|
||||
const spinner = createSpinner('Checking node status...').start();
|
||||
const response = await runCommand('curl http://localhost:8080/api/codex/v1/debug/info -w \'\\n\'');
|
||||
const response = await runCommand('curl http://localhost:8080/api/codex/v1/debug/info');
|
||||
spinner.success();
|
||||
|
||||
const data = JSON.parse(response);
|
||||
|
7
win.md
7
win.md
@ -3,7 +3,12 @@
|
||||
## Setup
|
||||
- Download and run Nodejs installer 'node-v22.14.0-x64.msi' from https://nodejs.org/en/download
|
||||
|
||||
## CMD (not powershell)
|
||||
## Enable npm for powershell
|
||||
- Open ps in admin mode
|
||||
- Run `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned`
|
||||
- Close admin ps
|
||||
|
||||
## Powershell
|
||||
- 'node --version' returns 'v22.14.0`
|
||||
- 'npm --version' returns '10.9.2'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user