iterative / setup-cml

GitHub Action for CML setup
25 stars 12 forks source link

perf: inhance version hint #81

Closed nibilin33 closed 2 years ago

nibilin33 commented 2 years ago

add npm-api to get latest version when cli --version failed

nibilin33 commented 2 years ago

@dacbd here, is it fit for the expect?

dacbd commented 2 years ago

@nibilin33 I see what this library is now. We would rather attempt to read and parse the version from the package.json that we just installed, instead of calling the npm API to resolve what latest is.

nibilin33 commented 2 years ago

@dacbd so just print after install? i assume there is something weird in ci, so i try to get info from cloud

dacbd commented 2 years ago

@nibilin33 well, determine the path it was installed to, and read the value from the package.json. I don't think we need to assume any weirdness from the CI. You can read RUNNER_OS from the env to determine what the appropriate npm/global path is.