setup-terraform/wrapper/lib/terraform-bin.js
Austin Valle 5aa9444145
[COMPLIANCE] Add copyright and license headers (#327)
* add copywrite changes

* extra slash

* [COMPLIANCE] Add copyright and license headers

* removed incorrect license

* reverted /dist

* add action.yml to copywrite ignore

* revert

* remove dist changes

* revert dist
2023-06-05 11:20:41 -04:00

14 lines
383 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* 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);
})();