Is Tilde Expansion (as in Bash) supported by the tool?
lamyergeier opened this issue Β· comments
Lamyergeier commented
I want to set Env. variable as Format=~/bin/Format
. Can I do it as follows:
{
"scripts": {
"parentScript": "cross-env Format=\"~/Format\" npm run childScript",
}
}
Actually, I am not sure if the tilde expansion still works. How can I confirm that the tilde expansion works?
I tried to test as follows (with okonet/lint-staged: π«π© β Run linters on git staged files):
{
"linters": {
"*.md": [
"cross-env qPre=~/\"opt/bin/qPreProcess\" echo ${qPre} > ~/Test1",
"cross-env qPre=\"${HOME}/opt/bin/qPreProcess\" echo ${qPre} > ${HOME}/Test2",
"cross-env qPre=\"/home/nikhil/opt/bin/qPreProcess\" echo ${qPre} > /home/nikhil/Test3"
]
}
But, none of the Test1, Test2 or Test3 gets generated.
Kent C. Dodds commented
Hi @anishmittal2020,
It's not a supported feature. And there's no plan to support it. Sorry.
Lamyergeier commented
@kentcdodds Is ${HOME}
supported?
Also, nothing happens for this as well:
{
"linters": {
"*.md": [
"cross-env qPre=\"/home/nikhil/opt/bin/qPreProcess\" echo ${qPre} > /home/nikhil/Test3"
]
}