-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add File Commands #571
Add File Commands #571
Conversation
fe0ee5a
to
8d1441e
Compare
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.
looks good, discussed offline
packages/core/src/core.ts
Outdated
issueCommand('set-env', {name}, convertedVal) | ||
|
||
const filePath = process.env['GITHUB_ENV'] || '' | ||
if (filePath && filePath.length > 0) { |
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.
nit: truthy check is sufficient (ensures length > 0)
Backport implementation from actions/toolkit#571
* Add SetFailedf and IsDebug helpers SetFailedf prevents from having to use Sprintf in caller methods * Backport new ExportVariable and SetPath Backport implementation from actions/toolkit#571
export function toCommandValue(input: any): string { | ||
if (input === null || input === undefined) { | ||
return '' | ||
} else if (typeof input === 'string' || input instanceof String) { |
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.
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.
run formet
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.
Added File Commands
No description provided.