webpack-shell-plugin
webpack-shell-plugin copied to clipboard
Shell script not executing correctly
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.
+1
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
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 :(
The answer in this post helped me to resolve the issue. Reposting as it may help others.