assets directory I find myself moving between the root
project directory and the
assets directory to perform all the
yarn related tasks in that
assets dir. Inevitably I’ll start doing something like this:
cd assets; npm install; cd ..
pushd assets; npm install; popd
In both cases using
; instead of
&& puts me back in the original directory regardless of the result of the npm command.
I just learned that using
cd in a subshell does not change the directory of the current shell, so I can also do this:
(cd assets; npm install)