setup-terraform/wrapper/lib/terraform-bin.js
2025-12-05 14:56:22 +00:00

14 lines
384 B
JavaScript

/**
* Copyright IBM Corp. 2020, 2025
* SPDX-License-Identifier: MPL-2.0
*/
const os = require('os');
const path = require('path');
module.exports = (() => {
// If we're on Windows, then the executable ends with .exe
const exeSuffix = os.platform().startsWith('win') ? '.exe' : '';
return [process.env.TERRAFORM_CLI_PATH, `terraform-bin${exeSuffix}`].join(path.sep);
})();