Last active
February 26, 2019 19:24
-
-
Save gerrard00/ca5f36b45629d82c61e2ba6296ca4f3d to your computer and use it in GitHub Desktop.
Update Visual Studio Code launch.json file to use current version of node from NVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_path="$(which node)" | |
temp_file=$(mktemp /tmp/launch-$$.json) | |
grep -v '^\s*//' < .vscode/launch.json | jq '.configurations[].runtimeExecutable = "'$node_path'"' > $temp_file | |
mv .vscode/launch.json .vscode/launch.json.bak | |
mv $temp_file .vscode/launch.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment