-
-
Notifications
You must be signed in to change notification settings - Fork 105
Description
"frontMatter.custom.scripts": [
{
"command": "~/.nvm/versions/node/v20.18.0/bin/node",
"script": "./bin/frontmatter/screenshot-header-image.cjs",
"title": "Retrieve Screenshot"
},
]I have a custom script like the above that relies on the command attribute. The problem is that this path/command might change over time, and I am forced to update this configuration every now and then. Technically speaking, the return value of which node would return this path and all its changes. Is it possible somehow to evaluate the content of command so that the resulting path doesn't need to be changed every time?
I remember adding this line because VSCode somehow doesn't respect/find my node/npm versions. They are in "the path," so when I run node in the VSCode terminal, it runs the proper version—just not in those custom scripts. Maybe I am doing something else wrong in the VSCode configuration.
Edit: something like this:
$(which node)would, under Bash, return the path.