webpack-shell-plugin icon indicating copy to clipboard operation
webpack-shell-plugin copied to clipboard

Shell script not executing correctly

Open mamodom opened this issue 7 years ago • 4 comments

When executing a command with output redirection or piping, the precedence isn't respected. (I think I can give a better explanation with an example).

When running echo "Hello" > ./world.txt with webpack-shell-plugin, instead of having a file named world.txt with the contents Hello, I get the string "Hello" > ./world.txt in the console

I have created a repo with the repro of the issue I'm seeing.

mamodom avatar Apr 15 '17 20:04 mamodom

+1

gpminsuk avatar Jul 30 '17 02:07 gpminsuk

It (the code) seems like it splits on the first space, it's impossible to properly chain commands because of that either.

['cd dir', 'stuff'] -> stuff isn't executed in dir ['cd dir ; stuff'] -> seems to use dir ; stuff as arguments for cd

nitwhiz avatar Nov 07 '17 22:11 nitwhiz

I'm trying to install some npm package in a different directory but it doesn't work.

onBuildEnd: ['cd ./dist/app && npm install somepackage']

But no success so far even though I tried different ways :(

bhaskerchari avatar Dec 22 '19 17:12 bhaskerchari

The answer in this post helped me to resolve the issue. Reposting as it may help others.

mkdir and then use --prefix

bhaskerchari avatar Dec 22 '19 18:12 bhaskerchari