You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.
I'm not sure whether that works properly on windows. But it's definitely outside of the scope of cross-env because the way it works on mac is what is inside $() will run before the rest of the script is run (so if you were to put a console.log in cross-env, you wouldn't see $(npm run version) at all, but instead you'd see the evaluated version).
Incidentally, for this specific scenario, you might consider using the environment variable npm_package_version which is set for you automatically when running npm scripts. (Learn more).
I'm not sure about that. I don't know how you'd do $(command) on Windows. But in any case, that's definitely not in scope for cross-env I'm afraid. Best of luck to you!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Can we assign env variables from command results?
In my package.json I have:
Does this work on windows? (I only have a mac at hand for now)
Thanks
The text was updated successfully, but these errors were encountered: