Stig Otnes Kolstad 2f6bfda1e2
Use @actions/core.exportVariable instead of set-env (#19)
* fix: use @actions/core.exportVariable instead of set-env

`set-env` is now deprecated. `@actions/core` exposes `exportVariable`
to be used instead.

https://github.com/actions/toolkit/tree/main/packages/core#exporting-variables

* chore: bump @actions/core to v1.2.6
2020-10-20 12:21:52 +05:30

19 lines
620 B
JavaScript

"use strict";
// We use any as a valid input type
/* eslint-disable @typescript-eslint/no-explicit-any */
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Sanitizes an input into a string so it can be passed into issueCommand safely
* @param input input to sanitize into a string
*/
function toCommandValue(input) {
if (input === null || input === undefined) {
return '';
}
else if (typeof input === 'string' || input instanceof String) {
return input;
}
return JSON.stringify(input);
}
exports.toCommandValue = toCommandValue;
//# sourceMappingURL=utils.js.map