toolkit
toolkit copied to clipboard
platform is undefined
Describe the bug
platform is undefined
To Reproduce Steps to reproduce the behavior:
- Create an index.js script that looks like:
import { platform } from "@actions/core";
console.log("platform is", platform);
- Create a new action that calls this script
- Invoke the action in another repo
- The console prints out "platform is undefined"
Expected behavior platform should be defined and have arch info as well.
Desktop (please complete the following information):
- OS: Linux
I have the same issue in a TypeScript action.
The documentation has an example how to use it, but indeed it's not defined.
The PR that added it hasn't been included in a release yet. Until then you can use node:os as per the PR.