Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@openkraken/cli install failed when node was installed by fnm #25

Open
BBBOND opened this issue Apr 25, 2022 · 0 comments
Open

@openkraken/cli install failed when node was installed by fnm #25

BBBOND opened this issue Apr 25, 2022 · 0 comments

Comments

@BBBOND
Copy link

BBBOND commented Apr 25, 2022

ENV

➜  ~ node -v
v18.0.0
➜  ~ npm -v
8.6.0
➜  ~ which node
/Users/xxxxx/Library/Application Support/fnm/node-versions/v18.0.0/installation/bin/node

Error

Error: Command failed: tar xzf /Users/xxx/Library/Application Support/fnm/node-versions/v18.0.0/installation/lib/node_modules/@openkraken/cli/kraken-darwin-0.10.5.tar.gz -C ./build

Reason

In my case, the file directory contains spaces. And you can't execute that command with space.
The code is in https://github.com/openkraken/cli/blob/master/install.js#L15

execSync(`tar xzf ${path.join(__dirname, tarName)} -C ./build`, processOptions);

Suggest to fix

execSync(`tar xzf ${path.join(__dirname, tarName).replace(/ /g, "\\ ")} -C ./build`, processOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant