mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2026-11-29 03:25:10 +01:00
Update Node.js runtime to 24 (#91)
Signed-off-by: Dawid Jóźwiak <5508474+Operativ@users.noreply.github.com> Signed-off-by: James Humphries <james@james-humphries.co.uk> Signed-off-by: Diogenes Fernandes <diofeher@gmail.com> Co-authored-by: Dawid Jóźwiak <5508474+Operativ@users.noreply.github.com> Co-authored-by: Diogenes Fernandes <diofeher@gmail.com>
This commit is contained in:
19 files changed
+44738
-43700
No files matched your search
@@ -1,5 +1,6 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* Copyright (c) OpenTofu
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
||||
@@ -20,7 +21,7 @@
|
||||
* // Log out STDOUT contents
|
||||
* console.log(listener.contents);
|
||||
*/
|
||||
class OutputListener {
|
||||
export default class OutputListener {
|
||||
constructor (stream) {
|
||||
this._buff = [];
|
||||
this._stream = stream;
|
||||
@@ -35,10 +36,6 @@ class OutputListener {
|
||||
}
|
||||
|
||||
get contents () {
|
||||
return this._buff
|
||||
.map(chunk => chunk.toString())
|
||||
.join('');
|
||||
return this._buff.map((chunk) => chunk.toString()).join('');
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = OutputListener;
|
||||
@@ -1,14 +1,17 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* Copyright (c) OpenTofu
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
|
||||
module.exports = (() => {
|
||||
const tofuBin = (() => {
|
||||
// If we're on Windows, then the executable ends with .exe
|
||||
const exeSuffix = os.platform().startsWith('win') ? '.exe' : '';
|
||||
|
||||
return [process.env.TOFU_CLI_PATH, `tofu-bin${exeSuffix}`].join(path.sep);
|
||||
})();
|
||||
|
||||
export default tofuBin;
|
||||
Reference in new issue
Block a user