Watch Environment Variables on windows #3663
-
Are the environment variables with the watch command supported on windows? This commands works as expected on linux npx -c 'lerna watch -- echo $LERNA_PACKAGE_NAME $LERNA_FILE_CHANGES' when making a change I get: header packages/header/src/Header.tsx When running the same command on windows and making a change I get: $LERNA_PACKAGE_NAME $LERNA_FILE_CHANGES |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It might be missing in the docs but the lerna watch -- cross-env-shell echo $LERNA_FILE_CHANGES |
Beta Was this translation helpful? Give feedback.
It might be missing in the docs but the
$
variables are Unix based only and not cross-platform, so a$var
can only be read with%var%
on Windows, or in your case that would be%LERNA_FILE_CHANGES%
, if you want a cross-platform approach you can usecross-env
lib