-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for installing tsserver #67
Conversation
Looks good to me but adding @hghmn as well. |
if (!commandExists(command)) { | ||
// Install it | ||
core.info(`Installing tsserver`); | ||
await exec.exec("npm", ["install", "-g", "typescript"]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if npm
is globally available in the GitHub action? Or would this require an additional step in the workflow like setup-node
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me double check...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hghmn according to GPT
"Yes, specifying using: "node20" in your action.yml file means that Node.js 20 will be available to your GitHub Action, and npm will also be available by default. Since npm is bundled with Node.js, you’ll be able to use npm commands within your action without additional setup."
Since we specify our action uses node20 to run, npm should be available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to test this in a pipeline that installs and uses a different version of node than the default version installed for node20
, and ensure that the tsserver
binary is available in the PATH for endorctl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested an action where I installed node18 then used the endorlabs/github-action and it still worked.
@hghmn can you take another look? |
Add support for installing tsserver prior to running Endor's github action